Skip to content

fermneto/Wavelength-MiniGame

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Wavelength Arduino

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.


How to play

  1. On power-up, all LEDs blink and the roulette spins, stopping on the target LED — memorize it!
  2. Turn the potentiometer to select the position you believe is the target
  3. Press the button to confirm your guess
  4. The LEDs reveal the result:
    • Correct → green LEDs blink (2, 4, 6, 8, 10)
    • Wrong → red LEDs blink (3, 5, 7, 9)
  5. A new round starts automatically

Required hardware

Component Qty
Arduino or others 1
LEDs 9
220Ω resistors 2
Potentiometer 1
Push button 1
Breadboard + jumpers

Wiring diagram

Wiring diagram

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)

Code overview

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

About

A target LED is secretly drawn and revealed through a spinning roulette animation. The player turns a potentiometer to point at the position they think is correct, then presses a button to confirm their guess.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages