A minimal physical version of the Wavelength board game, built with an Arduino and 9 LEDs.
The Arduino secretly draws a target LED and reveals its position through a roulette animation. The player uses a potentiometer to point at the position they think is correct and confirms with a button press — the LEDs tell the whole story.
- On power-up, all LEDs blink and the roulette spins, stopping on the target LED — memorize it!
- Turn the potentiometer to select the position you believe is the target
- Press the button to confirm your guess
- The LEDs reveal the result:
- Correct → green LEDs blink (2, 4, 6, 8, 10)
- Wrong → red LEDs blink (3, 5, 7, 9)
- A new round starts automatically
| Component | Qty |
|---|---|
| Arduino or others | 1 |
| LEDs | 9 |
| 220Ω resistors | 2 |
| Potentiometer | 1 |
| Push button | 1 |
| Breadboard + jumpers | — |
Pin 2 → LED 1 → GND (via 220Ω resistor)
Pin 3 → LED 2 → GND
Pin 4 → LED 3 → GND
Pin 5 → LED 4 → GND
Pin 6 → LED 5 → GND
Pin 7 → LED 6 → GND
Pin 8 → LED 7 → GND
Pin 9 → LED 8 → GND
Pin 10 → LED 9 → GND
Pin A0 → Potentiometer (center pin)
└── outer pins: 5V and GND
Pin 11 → Button → GND
└── pull-up resistor recommended (internal or external)
| Function | Responsibility |
|---|---|
startnw() |
Draws a new target LED and runs the round-start animations |
choosing() |
Reads the potentiometer and lights the player's chosen LED |
picks() |
Detects button press and compares the guess to the target |
animRand() |
Roulette animation that spins and stops on the target |
animWin() |
Blinks even LEDs (correct guess) |
animLoss() |
Blinks odd LEDs (wrong guess) |
animStart() |
Blinks all LEDs on startup |
allon() |
Turns all LEDs on |
allof() |
Turns all LEDs off |
