Arduino Game Projects: Games with Displays and Buttons
The most fun way to learn electronics is to build your own game. In these projects you'll combine buttons, a joystick, displays and a buzzer to create interactive games and animations. Game projects are especially great for learning timing with millis() and state machine logic.

Dice Project
No more lost dice during board games: every time you press the button, a random number from 1 to 6 appears on the 7-segment display.

Paddle Ball Game - SSD1306
A ball, two paddles and you: you play table tennis, one of the very first video games, on a small OLED screen.

OLED T-Rex Run: Arduino Dinosaur Game
The dinosaur game that pops up when your internet goes down, now on your desk: the dinosaur runs across the small OLED screen, cacti come at you, and you jump with a single button.

Pixel Snake 8x8 Matrix
Build the classic snake game with your own hands and play it. On a colorful 8x8 light matrix, you steer a green snake with a joystick and eat red apples; with every apple the snake grows, speeds up a…

Matrix Snake 16x16
The classic snake game, this time on a huge LED display made of 256 lights. You steer the green snake with a joystick and collect red apples; with every apple the snake grows, your score goes up on a…

Arduino Memory Game (4 LEDs + 4 Buttons + Buzzer)
Do you trust your memory? Four colored LEDs light up in a sequence, each playing its own note, and you repeat the same order by pressing the buttons.

Arduino Reaction Time Test with Sound Cue: Measure Your Reflexes in Milliseconds (LCD + Buzzer + 3 LEDs)
How fast are your reflexes? Press the button: the red LED says get ready, the yellow LED says steady and a random wait of 1.5 to 3.5 seconds begins. The moment the green LED lights up and the buzzer beeps, press again; your reaction time appears on the I2C LCD in milliseconds, with your session best and average below it. Press before green and the screen shows TOO EARLY! with a losing sound. Hold the button for a new player, so everyone races the same wait order.

Arduino LCD Runner Game
Side scrolling endless runner game running on 16x2 character LCD screen. Hero runs automatically, player jumps over obstacles by pressing the button. Random obstacles appear on the top and bottom row. Passive buzzer plays opening melody, jumping sound, 50 point celebration sound and end of game melody. "BlueGrays - Arduino Projects" splash screen is shown on startup. The score is updated instantly in the upper right corner of the screen.

Arduino Magic Drawing Tablet (2 Potentiometers + OLED Display)
We are rebuilding the classic magic drawing tablet with an Arduino! The left potentiometer moves the pen horizontally, the right one vertically, and the 0.96 inch OLED keeps a continuous line. The PEN button lifts and lowers the pen, while the CLEAR button wipes the screen with an eraser animation and a buzzer sound. A fun beginner project about analog input, jitter filtering and drawing on a display.

ESP32 Robot Eyes (OLED Display + TTP223 Touch Sensor)
A desk robot with feelings! The ESP32 draws two eyes on a 0.96 inch OLED that look around and blink on their own. Tap the TTP223 touch sensor and the robot gets happy, hold it and the eyes turn into hearts, poke it too often and it gets angry, ignore it for 20 seconds and it falls asleep. A passive buzzer gives every mood its own sound: a state machine, shape-based animation and non-blocking audio in one project.

Raspberry Pi Pico LED Tug of War Game (NeoPixel Strip + 2 Buttons + Buzzer)
A two-player button duel! The Raspberry Pi Pico turns a 30-LED WS2812B NeoPixel strip into a rope: red player on the left, blue player on the right. Every press pushes your color one LED forward; fill the whole strip to win the round, and take 3 rounds to win the match. Press too early in the countdown and you lose ground, the passive buzzer gives each player a different click, and the match ends in a rainbow. neopixel, debouncing and non-blocking sound in MicroPython.

Raspberry Pi Pico Memory Game (4 LEDs + 4 Buttons + Buzzer)
How many rounds can you last? The classic color and sound memory game comes to your desk with a Raspberry Pi Pico. The Pico plays a random color sequence, each color with its own LED and its own note. Repeat it in the same order on 4 buttons and one more color joins every round. Press a wrong one and the buzzer plays a game over tune while the right color blinks. Lists, random numbers and button reading in one game.

Raspberry Pi Pico Flappy Bird (OLED Display + Button + Buzzer)
That infuriating bird from your phone, now on a 0.96 inch OLED with a single button! A Flappy Bird style game on the Raspberry Pi Pico: every button press makes the bird flap, each pair of pipes you pass scores a point and the gaps get tighter. A buzzer plays the flap, point and record sounds. The high score lives in flappy_best.txt, so it survives a power cut. Physics, collisions and a 30 FPS game loop in one file.

ESP32 T-Rex Run Dino Game (OLED Display + Button + Buzzer)
Chrome's "no internet" dinosaur game, now on your desk! The ESP32 draws a running dino on a 0.96 inch OLED; press the button to jump while the cacti keep speeding up. Score and best score sit on the top line, and the best score is saved to ESP32 flash with Preferences, so it survives a power cut. It is the ESP32 version of the Arduino OLED T-Rex Run project, with a passive buzzer for jump, 100-point and crash sounds.

Arduino Cyclone Game: Stop the Light in the Middle (7 LEDs + Button + Buzzer)
Can you stop it on the red LED? A desktop version of the arcade Cyclone game: a light bounces across 7 LEDs and you score by pressing the button while the red centre LED is lit. Every hit reduces the time per LED by about 15%, down to a minimum of 45 ms, and the buzzer plays a tune. A wrong press costs a life, and the game ends after 3. The best score is kept in EEPROM, so it survives a power cut.

Arduino Tilt Marble Maze (MPU-6050 + MAX7219 8x8 LED Matrix)
No screen, no joystick: tilt the circuit and an LED marble rolls through a maze! The MPU-6050 accelerometer measures the tilt, and the marble on the MAX7219 8x8 LED matrix rolls that way without passing through walls. Reach the goal and a passive buzzer plays a tune as the next maze opens; finish all 3 for a smiley. Library-free sensor reading, tilt-to-speed control and mazes written as text in one project.

Arduino Tetris (MAX7219 8x32 LED Matrix + 4 Buttons + Buzzer)
No screen, just 256 LEDs: Tetris with music on an Arduino! A MAX7219 8x32 LED matrix standing upright becomes an 8 wide, 32 tall playfield, and 4 buttons move, rotate and drop the pieces. A passive buzzer plays the Tetris theme, full rows flash away and the game speeds up every 2 rows. The matrix is driven without a library, and the best score is kept in EEPROM.

Arduino Alien Attack (0.96 inch OLED + Joystick + Buzzer)
The 1978 legend on a 0.96 inch screen! On a 128x64 OLED, an army of 15 aliens marches, steps down at every edge and speeds up as it thins out. The joystick steers the ship like a wheel and its button fires; there are 4 shields, a bonus UFO and waves that keep getting harder. A passive buzzer plays the classic march and the effects, and the best score is kept in EEPROM.

Arduino Whack-a-Mole Game (4 LEDs + 4 Buttons + TM1637 Display)
Hit it the moment it lights up! The arcade classic whack-a-mole on your desk: one of 4 LEDs lights up at random, and if you press the button of the same colour before it goes out, you score. Every 5 hits is a new level and the moles stay up for less time. A wrong button costs 1 point and 3 seconds. Time and score show on the TM1637, the record lives in EEPROM, and a passive buzzer gives each hole its own sound.

Arduino Quiz Buzzer for 3 Players (4 Buttons + 3 LEDs + Buzzer)
Who buzzed first? The Arduino decides down to the millisecond! The first to buzz answers system from TV quiz shows, for 3 players and a host button. The fastest player's LED lights up bright with its own sound, and the other buttons lock. Buzzing before the host says ready is a foul. Hold the host button for 1 s and the scoreboard plays on the LEDs. Ready for real use in class or at home.

ESP32 Two-Player Click Race (OLED Display + 2 Buttons + Buzzer)
Challenge a friend to a 10-second click race! Both players press their button to get ready, then after a 3-2-1 countdown everyone mashes as fast as they can. The ESP32 races two bars side by side on a 0.96 inch OLED, with the time left, both scores and the leader shown live. When time is up you see the winner and clicks per second, and the best score is saved with Preferences. A passive buzzer plays a click tone for each player, a whistle and a fanfare.

Arduino Number Guessing Game (4x4 Keypad + I2C LCD + Buzzer)
I'm thinking of a number from 1 to 100. Can you find it in 7 guesses or fewer? The Arduino picks a secret number, you type your guess on a 4x4 keypad and send it with #. The I2C LCD says HIGHER or LOWER and shows the range left and your tries, while a passive buzzer gives each hint its own sound. The fewest-tries record is kept in EEPROM. A fun first game that uses a keypad and an LCD together.

Raspberry Pi Pico Paddle Ball Game (OLED Display + 2 Potentiometers + Buzzer)
The classic paddle ball game, now on a 0.96 inch OLED for two players! Each player turns their own potentiometer to move a paddle. The ball speeds up on every hit and bounces off at an angle set by where it lands on the paddle; first to 5 points wins. A buzzer plays the wall, paddle and point sounds. Analog input, integer physics and partial screen updates in one game on the Raspberry Pi Pico.

Raspberry Pi Pico Shake Dice (MPU-6050 + OLED Display + Buzzer)
Lost your dice? No problem: shake the circuit and the die rolls on a 0.96 inch OLED! An MPU-6050 accelerometer senses the shake, the die wobbles and spins, and once you stop it slows down and lands on a face. The MODE button switches between one die and two; roll a double and the screen flashes while the buzzer plays a celebration tune. The Raspberry Pi Pico reads the sensor straight over I2C, no library needed.

ESP32 Slot Machine Game (OLED Display + Button + Buzzer)
Pull the lever and watch the reels spin! This ESP32 project spins three reels of cherry, bell, BAR and 7 icons on a 0.96 inch OLED with a realistic slow-down, all from one button. The credits are purely virtual, with no real money involved: the goal is to learn the probability and random numbers behind games of chance. If the first two reels match, the third spins longer for suspense, 7-7-7 plays a JACKPOT tune, and Preferences keeps the credits.

Raspberry Pi Pico Chess Clock (2 TM1637 Displays + 2 Buttons + Buzzer)
Make your move, hit the button, and the clock switches sides! A two-player chess clock with a Raspberry Pi Pico: each player's time runs down on their own TM1637 display and the mover gets an increment. The last 10 seconds show hundredths, a flagged side blinks FLAG and the buzzer sounds an alarm. Press both buttons together to pause. The TM1637 driver lives in the code, no library needed.

Raspberry Pi Pico Whack-a-Mole (4 LEDs + 4 Buttons + Buzzer)
Hit it when it lights up! The arcade classic Whack-a-Mole on your desk with a Raspberry Pi Pico. Four LEDs are four holes; a lit LED is a mole popping up, so press the button on the same row before the light goes out. Every 5 hits you level up and the moles stay up for less time. You get 3 misses, and a buzzer announces every hit, miss and new record.

ESP32 Color Drawing Tablet (ILI9341 + Joystick + Buttons)
Push the joystick and draw! We are building a small drawing tablet with an ESP32 and a 2.8 inch ILI9341 color display. The joystick moves the cursor faster the further you push it, and four buttons lift the pen, change the color (8 colors + eraser) and brush size, and clear the canvas. In mirror mode every stroke is copied to the other side, so hearts and butterflies draw themselves.

Arduino Penalty Shootout Game (Servo Goalkeeper + TM1637 Display)
A 5-shot penalty shootout on your desk! After a 3-2-1 beep and a whistle you shoot with the left, middle or right button, and the SG90 servo keeper dives to a corner at the same moment. The keeper learns: keep shooting at the same corner and it starts diving there more often. The score is on the TM1637 display, the ball's corner on the LEDs, and the goal tune comes from a passive buzzer. Randomness, weighted odds and servo control in one game.

Raspberry Pi Pico Record-and-Replay Robot Arm (3 Servos + Joystick)
Show it a move once and the robot arm repeats it on its own! The Raspberry Pi Pico drives the base, shoulder and gripper with three SG90 servos; a joystick steers the arm and a click opens or closes the gripper. Press RECORD and the motion is saved every 100 ms; press PLAY and the arm follows the same path once or on a loop, at x1, x2 or x0.5 speed. The "teach and repeat" method of factory robots, right on your desk.

ESP32 Rhythm Game (8x8 NeoPixel Matrix + 4 Buttons + TM1637)
Notes rain down, and if you hit them on time you're the one playing the song! Colored notes fall down 4 lanes of an 8x8 NeoPixel matrix; press the right button the moment one reaches the bottom row and the buzzer plays that note of the melody. The score is on a TM1637 display and combos multiply your points. Üsküdar'a Gider İken, Ode to Joy and Jingle Bells are built in, with an S/A/B/C grade at the end and fireworks for a new record.

Arduino Bomb Defusal Game: Cut the Right Wire (TM1637 + 4 Wires + Buzzer)
The "red or blue?" movie scene on your desk! Press START and seconds and hundredths race across the TM1637, while the passive buzzer beeps a little faster and higher each time. One of four wires defuses the bomb, one sets it off, one halves the time left and one does nothing, and the roles are shuffled every round. Randomness, non-blocking timing with millis() and an EEPROM defuse counter in one game.

Raspberry Pi Pico Cowboy Duel (2 SG90 Servos + TM1637 + Buzzer)
A two-player reflex duel: a western whistle plays, the yellow LED lights up at a random moment and the first to press wins! The Raspberry Pi Pico knocks the loser's cardboard cowboy down with an SG90 servo and makes the winner's wave; a TM1637 display shows the reaction time in milliseconds. Press before the LED and you shoot your own cowboy. First to 3 points is champion, and the fastest reaction is saved as the record.

Arduino Brick Breaker Game (OLED Display + Potentiometer + Buzzer)
The 80s arcade classic in your hands! Bounce the ball and smash 5 rows of bricks on a 0.96 inch OLED, sliding the paddle by turning a potentiometer. Five levels bring five different patterns, top row bricks take two hits and some bricks drop a box that widens your paddle. Every brick broken before the ball touches the paddle again raises the passive buzzer's note one step. If nobody plays, the game plays itself.

ESP32 Virtual Pet (OLED + 3 Buttons + Buzzer)
The pocket toy of the 90s is back on an ESP32! A pixel baby hatches from an egg on the 0.96 inch OLED; with 3 buttons you feed it, play a mini game, clean up after it and switch off the light so it can sleep. Hunger, happiness, energy and cleanliness drop over time, and the passive buzzer beeps when it needs you. It grows into a different adult depending on your care, and since its state lives in NVS, it waits for you even after you unplug it.

Raspberry Pi Pico Cross the Road: Frog Game (8x8 NeoPixel Matrix + Joystick + Buzzer)
The classic arcade frog game on 64 color LEDs! The Raspberry Pi Pico draws a road of red and yellow cars and a river of drifting logs on an 8x8 NeoPixel matrix; you move the frog one square at a time with a joystick and fill three homes. The traffic speeds up every level, and the buzzer plays hop, crash and home sounds. 3 lives, a score and a best score kept in flash; leave it alone and the game plays itself.

ESP32 Hangman Game (OLED + KY-040 Rotary Encoder + Buzzer)
The classic notebook game hangman on an ESP32 and a 0.96 inch OLED! Turning the KY-040 rotary encoder slides the alphabet strip, pressing it guesses the selected letter. A correct letter flies into place and the green LED lights up; a wrong one adds a piece to the gallows while the red LED and the buzzer complain. Turkish and English words, three categories, a best streak and a two-player mode.

Arduino Toy Car Speed Radar (2 HC-SR04 + TM1637 Display)
A speed radar for toy cars! Two HC-SR04 sensors sit 20 cm apart beside the track and time the car as it passes them with micros(): speed = distance / time. The TM1637 shows the result in cm/s, km/h or as the 1:64 scale real-life speed. Over the limit, a white LED fires like a speed camera flash and a siren sounds; the reverse direction shows a minus sign and the record stays in EEPROM.

ESP32 8-Bit Sound Effects Box (6 Buttons + OLED + Buzzer + Potentiometer)
Every button is a retro game sound! The ESP32 gives six buttons a coin, jump, power-up, laser, explosion and extra-life sound; none of them is a sound file, each one is generated live on a passive buzzer with PWM duty cycle and frequency slides. The 0.96 inch OLED draws a pixel animation for every sound. A potentiometer shifts the pitch from giant to squirrel, and buttons 1 and 6 together record a short beat.

Raspberry Pi Pico Hot Potato Party Game (5 LEDs + Potentiometer + 2 Buttons + Buzzer)
A party game that goes from hand to hand: press START, a secret fuse begins and the device gets passed around to a ticking sound. The tick-tock keeps speeding up and a 5-LED heat bar fills from green to red; when time runs out the buzzer booms and whoever is holding it loses. A potentiometer picks a short, medium or long round, and the PASS button is pressed at every hand-off. Hold it longer than 6 seconds and you get a penalty: the fuse loses 2 seconds.

Arduino Random Draw Machine (TM1637 + Potentiometer + Buzzer)
Who stands up in class, who buys a gift for whom at the holidays? This box runs three draws on its own: in CLASS mode a number from 1..N comes up and never repeats in that round, in LOTTO mode 6 different numbers from 1–90 are drawn and sorted, and in GIFT mode a Sattolo shuffle makes sure nobody draws themselves. The digits spin like a wheel on the TM1637, slow down and stop with a buzzer fanfare. A potentiometer sets the group size.

ESP32 Retro Push-Button Phone (Keypad + I2C LCD + Buzzer)
An 80s and 90s payphone on your desk! Lift the handset for a 425 Hz dial tone, dial on the 4x4 keypad, and the other end either rings and answers or gives you the busy signal. Credit runs down while you talk, and the line drops when it is gone. There is A–D speed dial, redial and a credit card too, and the I2C LCD shows every step. A fun first look at state machines and timing that never waits.

Raspberry Pi Pico Nim Game: Can You Beat the Pico? (10 LEDs + 4 Buttons + Buzzer)
Whoever takes the last stick loses: can you beat the Pico? The matchstick game Nim lights up with a Raspberry Pi Pico. 10 yellow LEDs are 10 sticks; you take turns removing 1, 2 or 3, 4 buttons pick your move and a buzzer voices every turn. The Pico uses a mod 4 trick to always leave you 1, 5 or 9 sticks: if you start, the right first move wins, but if the Pico starts it never loses.

ESP32 Arcade Basketball Machine (LDR + TM1637 + 24 LED Ring)
The fairground basketball machine, now on your desk! As the ball drops through the cardboard hoop it cuts the light on the LDR light gate, and the ESP32 counts a basket. Time left is a shrinking arc on the 24 LED ring and the score sits on the TM1637; baskets are worth 3 in the final 10 seconds, and 3 baskets within 2 seconds set the ring on fire. The threshold follows a slow average of the light, so drawing the curtains never scores a basket.

Arduino Remote Control Times Table Quiz (IR Remote + I2C LCD + 2 LEDs)
A remote control turns into a game show clicker: the I2C LCD shows "7 x 8 = ?", you type the answer with the number keys and send it with PLAY. The time bar on the bottom row melts in 10 seconds; fast right answers score more, and after 3 in a row a streak bonus kicks in. There are three levels, reverse questions, a team mode with turns and a TEST key that gives the whole class the same questions; a green or red LED shows right or wrong.

Raspberry Pi Pico Reverse Corner Brain Game (6 LEDs + 4 Buttons + Servo + Buzzer)
Green means press the same way, red means the opposite way, and a "boom" means don't press at all! A 20-second focus and reflex game on the Raspberry Pi Pico: one of 4 yellow LEDs in a plus shape shows the direction, the green or red LED in the middle shows the rule, and you answer with 4 buttons. The answer time shrinks with every hit and traps test your finger. The score climbs on a servo needle dial, from TURTLE to LIGHTNING.

Raspberry Pi Pico Grip Strength Meter (HX711 + Load Cell + TM1637 + 3 LEDs + Buzzer)
The grip version of the fairground strength tester! Squeeze the 50 kg load cell between two handles: the HX711 reads the force, the TM1637 counts up in kilograms, the buzzer pitch rises and 3 LEDs show bronze, silver and gold. The peak is held, and the record stays in best.txt even through a power cut. In duel mode two players squeeze in turn and the winner gets a fanfare.

ESP32 Card Dealing Robot (2 Servos + I2C LCD + Buzzer)
Let a robot deal the cards on game night! A turntable servo turns to the next player, a pusher arm servo slides the top card off the deck, and the buzzer clicks for every card. It knows Pişti and Batak, two classic Turkish card games, plus a colour-matching card game with 7 cards each and one face-up card, for 2–4 players with a random first player and pause, cancel and speed control. The I2C LCD shows who gets which card and what is left in the deck.
