Flappy Bird Game written in Rust for the ESP32 with an OLED display, using the Embassy framework.
- ESP32 (WROOM Dev Kit 1)
- SSD1306 OLED I2C 128x64 Display
- Push Button
- Jumper wires and breadboard
- [Optiona]: Active Buzzer
You can use the joystick module because it has a push button. I used that only because it was easy to play.
ESP32 Pin | Component |
---|---|
GPIO 23 | SDA pin of OLED |
GPIO 18 | SCL pin of OLED |
3.3V | VCC pin of OLED |
GND | GND pin of OLED |
GPIO 32 | One side of push button |
GND | Other side of push button |
If you want a buzzer sound when you score, you can add this optional circuit.
ESP32 Pin | Component |
---|---|
GPIO 33 | Positive side of buzzer |
GND | Other side of buzzer |
cargo run --release
or with Buzzer support
cargo run --release -F buzzer
esp32-rust-flappy-bird-game.mp4
You can refer to the following tutorials in the "impl Rust on ESP32" book to learn how to use OLED and Active Buzzer with the ESP32.
- Use good bird sprite. If you have better looking sprite, please send PR :)