A space shooting game for the ESP32 with an OLED display. You control a spaceship, shoot enemies, and dodge attacks. Written in Rust using the Embassy framework. The game gets harder as you score more;levels increase, enemies move faster, and more bullets fired from enemy.
- ESP32 (WROOM Dev Kit 1)
- SSD1306 OLED I2C 128x64 Display
- Joystick Module
- Jumper wires and breadboard
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 |
3.3V | 5V pin of Joystick |
GPIO 32 | SW pin of Joystick |
GPIO 13 | VRX pin of Joystick |
GPIO 14 | VRY pin of Joystick (unused) |
Note: I used only the VRX input for the player's movement(Up and Down) and won't be tracking VRY.
You can refer to the following tutorials in the "impl Rust on ESP32" book to learn how to use the joystick and OLED with the ESP32.
- Optional feature to use buttons instead of joystick