🎮 DIY Arduino Nano Snake Game Console with OLED Display and Buttons
🎮 DIY Arduino Nano Snake Game Console with OLED Display and Buttons
Do you love retro games? Want to build your own handheld Snake game console? Today, I'm going to show you how to make a DIY Snake Game Console using an Arduino Nano, 0.96” OLED Display, and just 4 buttons! Let’s dive into this fun and educational electronics project. 💡
Welcome to the PCBWay 11th Badge Design Contest!
Are you passionate about PCB design and creativity? PCBWay is back with its 11th Badge Design Contest, inviting electronics enthusiasts, engineers, and designers to showcase their skills by creating unique and innovative badge designs.
This contest is a fantastic opportunity to unleash your imagination, push the boundaries of PCB art, and win exciting prizes. Whether you're a hobbyist or a professional, PCBWay provides the perfect platform to share your designs with a global community.
Interested? Check out the contest details here: PCBWay 11th Badge Design Contest. Get started today and make your mark in the world of creative PCB design! 🚀
🧰 Components Needed
Arduino Nano
-
OLED Display (0.96” I2C)
-
4 Push Buttons
-
4 × 10KΩ Resistors
-
Breadboard & Jumper Wires
-
USB Cable for Programming
🔌 Wiring Diagram
Below is the wiring diagram for connecting the components. Make sure you follow this properly:
OLED Display:
GND → Arduino GND
-
VCC → Arduino 5V
-
SCL → Arduino A5
-
SDA → Arduino A4
Buttons (with Pull-up Resistors):
UP → Arduino D2
-
LEFT → Arduino D3
-
RIGHT → Arduino D4
-
DOWN → Arduino D5
Each button is connected with a 10K pull-down resistor to ensure stable readings.
💻 Arduino Code
You can copy and paste the code below directly into your Arduino IDE. This code draws a Snake game on the OLED display and lets you control it using the 4 buttons.
🔗 You can find the full code here or copy it from the post above.
🕹 How It Works
The snake moves on a grid drawn on the OLED screen.
-
You control its direction using 4 buttons (UP, DOWN, LEFT, RIGHT).
-
The snake grows longer every time it eats food.
-
The game ends if the snake hits the wall or itself.
🧠 Tips
You can increase the difficulty by reducing the delay in the
loop()
function.-
Add a score system and show it on the display.
-
Enclose the components in a 3D-printed or cardboard case for a portable console!
📽 Bonus: Video Tutorial
🎥 I'm also making a CapCut Bangla Tutorial Series on this. Stay tuned on my YouTube channel to watch the full build and see it in action!
📎 Conclusion
This project is a fantastic way to learn about Arduino, graphics, and game logic while having fun. Once done, you’ll have your very own handheld Snake Game Console that you built from scratch! 🚀
If you liked this tutorial, leave a comment, share with friends, and subscribe for more awesome DIY electronics projects. ❤️
No comments