Project Overview
Simon Says Memory Game using Arduino Uno
Build an interactive Simon Says Memory Game using the popular Arduino Uno. This beginner-friendly electronics project improves memory skills while teaching LEDs, push buttons, buzzer tones, arrays, loops, and debouncing techniques.
The game generates a random LED sequence that the player must repeat correctly. Each round increases difficulty by adding one more step to the pattern.
You can build this on a breadboard or simulate it using the Wokwi platform.
Project Overview
This Simon Says game includes:
-
4 Colored LEDs (Red, Green, Blue, Yellow)
-
4 Push Buttons (one for each LED)
-
Piezo Buzzer for sound feedback
-
Increasing difficulty levels
-
Speed progression system
-
Button debouncing logic
-
Musical tone feedback for each color
Components Required
-
Arduino Uno
-
4 LEDs (Red, Green, Blue, Yellow)
-
4 × 220Ω resistors (LED current limiting)
-
4 Push Buttons
-
10kΩ resistors (optional if not using INPUT_PULLUP)
-
Piezo Buzzer
-
Breadboard
-
Jumper wires
Pin Configuration
| Component | Arduino Pin |
|---|---|
| Red LED | 2 |
| Green LED | 3 |
| Blue LED | 4 |
| Yellow LED | 5 |
| Button 1 | 6 |
| Button 2 | 7 |
| Button 3 | 8 |
| Button 4 | 9 |
| Buzzer | 10 |
Buttons use INPUT_PULLUP, so external resistors are optional.
How the Game Works
-
Arduino generates a random LED sequence.
-
LEDs blink one-by-one with sound.
-
Player repeats the sequence using buttons.
-
If correct → next round adds one more step.
-
Every 5 rounds → level increases and speed increases.
-
If wrong → game over sound plays and game resets.
Game Logic Features
🔹 Random Sequence Generation
Uses:
sequence[sequenceLength] = random(0, 4);
Each number represents a color.
🔹 Speed Progression System
-
Initial delay: 500 ms
-
Speed reduces every 5 rounds
-
Minimum speed: 200 ms
This increases difficulty gradually.
🔹 Button Debouncing
Prevents false triggering using:
-
millis()timing -
50ms debounce delay
-
State comparison logic
🔹 Timeout System
If player doesn't respond within 5 seconds:
Timeout → Game Over
Sound System
Each color has a musical tone:
| Color | Frequency | Note |
|---|---|---|
| Red | 262 Hz | C |
| Green | 330 Hz | E |
| Blue | 392 Hz | G |
| Yellow | 494 Hz | B |
Special sounds:
-
Correct: 800 Hz short beeps
-
Level Up: 659 Hz celebratory tone
-
Game Over: 200 Hz low tone
Learning Concepts
This project teaches:
-
Arrays in Arduino
-
Random number generation
-
Digital input & output
-
INPUT_PULLUP usage
-
Buzzer tone generation
-
Game loop structure
-
State management using Boolean flags
-
Debouncing using millis()
-
Progressive difficulty algorithm
Wokwi Simulation
To simulate:
-
Open Wokwi
-
Create new Arduino Uno project
-
Paste your provided
diagram.json -
Upload the Arduino code
-
Click Run ▶️
You’ll see LEDs blink in sequence and can press buttons to repeat.
Possible Upgrades
You can extend this project with:
-
16x2 LCD score display
-
EEPROM high-score saving
-
MP3 sound module
-
RGB LED version
-
Bluetooth control
-
8-button advanced mode
-
Multiplayer mode
Final Result
You’ve built a complete interactive memory game using Arduino that includes:
-
Real-time input handling
-
Progressive game difficulty
-
Audio-visual feedback
-
Embedded system logic
This project is perfect for:
-
School robotics labs
-
Brain training games
-
Beginner Arduino learners
-
STEM workshops
How It Works
-
Arduino generates a random LED sequence.
-
LEDs blink one by one with sound.
-
Player repeats the sequence by pressing buttons.
-
If correct → next level adds one more step.
-
If wrong → buzzer sounds and game resets.
Comments
Post a Comment