Arduino Uno
The Arduino Uno is a popular microcontroller board based on the ATmega328P. It serves as the brain of this project, managing inputs, game logic, and display output.
Retro Snake remade on Arduino & OLED! Eat, grow, and dodge your tail, using a joystick for classic gameplay and real hardware fun.
Download CodeThe retro Snake game, revived for Arduino! Play using pixel graphics on an OLED, dodge your own tail, eat food, and watch your score climb, with authentic joystick controls for a true arcade experience.
Move the snake using the joystick module—each time you eat "food" the snake grows longer, but beware of crashing into your own tail or the walls! The OLED screen updates the snake's position, score, and high score in real time; a buzzer gives sound on food consumption and game over moments.
| Component | Model/Size | Description |
|---|---|---|
| Arduino (Uno/Nano) | Uno, Nano | Main controller board |
| OLED Display | SSD1306, 0.96" or 1.3" | Display game graphics |
| Joystick Module | Analog, KY-023 | Directional player control |
| Buzzer | Piezo, 5V | Sound for game events |
| Breadboard, Jumper Wires | - | Convenient prototyping |
| Module | Pin | Arduino |
|---|---|---|
| OLED I2C | VCC / GND / SDA / SCL | 5V / GND / A4 / A5 (Uno/Nano) |
| Joystick | VRX / VRY / SW / VCC / GND | A0 / A1 / D2 / 5V / GND |
| Buzzer + | Connects to D9 (PWM) | |
| Buzzer - | Connects to GND |
The Arduino Uno is a popular microcontroller board based on the ATmega328P. It serves as the brain of this project, managing inputs, game logic, and display output.
This 0.96-inch OLED module uses I2C communication. It provides crisp pixel graphics for the game. The display connects to Arduino's I2C pins (A4 & A5).
Connection: VCC → 5V, GND → GND, SDA → A4, SCL → A5.
The analog joystick acts as the input device to control the snake's movement by reading X and Y axis positions.
Connection: VRX → A0, VRY → A1, SW → D2 , VCC → 5V, GND → GND.
The buzzer provides simple audio feedback for game events such as food eaten and game over.
Connection: + → D9 (PWM pin), - → GND.
See schematic below for full prototyping setup.