Before installing this, please make sure you have installed:
- Rust
- probe-rs
To succesfully run this rust application, you have to follow these steps:
- Clone the repository
git clone https://github.com/UPB-PMRust-Students/project-lvanaaa.git - Change directory to the project
cd project-lvanaaa
- inside
src/binfolder there is the code namedpong.rs - there are also 2 folders
picturesandschemawhich shows the KiCad schematics and hardware pictures
- Build the project using
cargo build --bin pong.rs - Run the command to flash on the Pico (make sure the debug probe is connected)
cargo run --bin pong.rs
A multiplayer Pong game inspired by the classic consoles, bringing back the experience of playing with friends during your free time. Designed to capture the simplicity and fun of those timeless gaming moments. This project is built using a Raspberry Pi Pico 2W, an LCD display, and two joysticks that control the paddles. A buzzer is triggered when the ball collides with the paddles or the top/bottom walls, while a life system is implemented using red LEDs.
| Device | Usage | Price |
|---|---|---|
| Raspberry Pi Pico 2W | The microcontroller | 39.66 RON |
| 2 x Biaxial Joystick Module | Joystick | 10.70 RON |
| 2.8" SPI LCD Module with ILI9341 Controller (240 x 320 px) | LCD Display | 69.99 RON |
| Passive Buzzer Module | Buzzer | 1.69 RON |
| 6 x 5 mm Red LED with Diffused Lens | Red LED | 2.34 RON |
| 2 x 5 mm Green LED with Diffused Lens | Green LED | 0.78 RON |
| 15 cm 10p Male-Female Wires | Male-Female Wires | 4.45 RON |
| 10 cm 40p Male-Female Wires | Male-Male Wires | 5.99 RON |
| 8 x 220Ω Resistors | Resistors | 0.80 RON |
| Library | Description | Usage |
|---|---|---|
| embassy-rp | Access to the pheripherals | Initializing and interacting with peripherals |
| embassy-executor | An async/await executor designed for embedded usage | Used for asynchronous programming |
| embassy-time | Timekeeping, delays and timeouts. | Used for delays |
| embassy-sync | Synchronization primitives and data structures with async support | Used for providing channels, mutexes, signals, etc |
| ili9341 | Driver to interface with the ILI9341 TFT LCD display | Used to controll the display |
| embedded-graphics | 2D graphics library that is focused on memory constrained embedded devices | Used for drawing and writing on the display |
| embedded-hal-async | An asynchronous Hardware Abstraction Layer (HAL) for embedded systems | Provides a standard way to use hardware asynchronously across different embedded devices |
| gpio | GPIO management | Used for controlling GPIO pins |
| adc | ADC driver | User for controlling the joysticks |
| pwm | PWM module | Used for controlling the buzzer |