An ESP32-based retro gaming keychain project featuring a custom startup sequence and an interactive game selection menu plotted on an SSD1306 OLED display.
- Custom startup logo and spinning star boot animation (3 seconds)
- Interactive game selection menu with visual cursor highlighting
- Configurable push-button directional and action UI controls
- Non-blocking state-machine architecture for the display loops
- WiFi Capabilities: Connect to pre-programmed wireless networks via visual GUI
- Subsystem Apps: Modular architecture supporting utilities (like HTTP Ping Google) and Games (Pong)
- ESP32 Development Board
- SSD1306 OLED Display (128x64 pixels)
- 5x Push Buttons (Tactile switches)
- Jumper wires
Connect the OLED display to the ESP32 using the following I2C pins:
| SSD1306 OLED Pin | ESP32 Pin | Description |
|---|---|---|
| VCC | 3.3V | Power (3.3V recommended) |
| GND | GND | Ground |
| SCL (Clock) | GPIO 22 | I2C Clock |
| SDA (Data) | GPIO 21 | I2C Data |
Connect your 5 navigational push buttons between the listed GPIO pins and GND. The internal pull-up resistors are enabled, so no external resistors are required.
| Switch | ESP32 Pin |
|---|---|
| UP | GPIO 32 |
| DOWN | GPIO 33 |
| LEFT | GPIO 25 |
| RIGHT | GPIO 26 |
| SELECT | GPIO 27 |
Note: Depending on your specific ESP32 board, the location of 3.3V and GND might vary, but I2C pins 21 and 22 are the standard hardware defaults for SDA and SCL respectively.
This project manages sensitive Wi-Fi credentials via a local header file to keep them out of version control systems.
- Navigate to the
key32/directory. - We've provided a boilerplate
config.example.hfile. Rename this file (or copy it) toconfig.h. - Open
config.hand enter your personal network SSIDs and Passwords in the defined array.
- Install the required libraries in the Arduino IDE:
Adafruit GFX LibraryAdafruit SSD1306
- Open the
key32/key32.inofile in the Arduino IDE. - Select your exact ESP32 board model and appropriate COM port.
- Compile and upload the sketch to the ESP32. Set your serial monitor to 115200 baud to see any error messages (if the display fails to allocate memory).