Arduino Nano OLED Flappy

by DESHBOT in Circuits > Arduino

10 Views, 0 Favorites, 0 Comments

Arduino Nano OLED Flappy

WhatsApp Image 2026-09-15 at 3.01.32 PM.jpeg

The Flappy Bird Game is a simple interactive game developed using an Arduino Nano and a 128×64 I2C OLED display. The player controls a bird using a push button and tries to pass through the gaps between moving pipes.

The project demonstrates the use of Arduino programming, OLED graphics, push-button input, collision detection, random number generation, and game logic.

Supplies

des 1.jpeg
uno.jpeg
oled.jpeg

Deshbot shield

uno nano

Oled display

button (inbuild in Deshbot shield)

Working Principle


The game contains three main elements:

Bird

The bird is displayed as a small circle on the OLED. Gravity continuously pulls the bird downward.

When the player presses the button, the bird receives an upward movement, similar to the original Flappy Bird game.

Pipes

The pipes move from the right side of the OLED toward the left side.

A random gap is created between the upper and lower pipes. The player must control the bird so that it passes through this gap.

Score

Whenever the bird successfully passes a pipe, the score increases by one.

The score is displayed at the top of the OLED.

Game Controls

WhatsApp Image 2026-09-15 at 3.02.01 PM.jpeg
WhatsApp Image 2026-09-15 at 3.01.39 PM.jpeg


Push Button:

  1. Press → Bird moves upward.
  2. Release → Bird falls because of gravity.

After Game Over:

  1. Press the button → Game starts again.


Downloads

. Features


  1. 128×64 OLED graphics
  2. One-button control
  3. Moving pipes
  4. Random pipe gaps
  5. Gravity-based bird movement
  6. Collision detection
  7. Automatic score counting
  8. Game-over screen
  9. Restart functionality


Conclusion


The Arduino Nano OLED Flappy Bird Game is a simple but practical embedded-system project. It combines hardware and software to create an interactive game.

Through this project, we learn about Arduino Nano, I2C communication, OLED displays, button input, physics-based movement, collision detection, random numbers, and C++ programming.

The project is inexpensive, easy to build, and can be further developed into a more advanced handheld gaming system.