Match the Color Game

by am_smj in Circuits > Arduino

384 Views, 1 Favorites, 0 Comments

Match the Color Game

ce1.png

I designed a circuit in which the user must match the colours as many times as possible for a high score as they blink on and off at a set speed from left to right. On the serial monitor, the score and information are presented. The buzzer makes three distinct sounds: one for matching, one for mismatching, and one for a new high score. The project is straightforward and easy to comprehend.

Supplies

Components used and their price breakdown:

1) 1x Arduino UNO $27.99

2) 1x555 Timer $1.59

3) Breadboard $9.60

4) 1x Buzzer $12.49 (Pack of 10)

5) LEDs 4x yellow, 3x green, 2x red $5.10 (100PCS 2 x 3 x 4 Square LED 234 Red Light-emitting Diode White Yellow Red Green Blue Electronic DIY Kit)

6) RBG LED $0.23

7) Resistors 12x 10kΩ, 6x 330Ω $18.99 (1280 Pieces 64 Values Resistor Kit)

8) 1x100 μF Polarized Capacitor $12

9) Wires $11 (120pcs Multicolored Wires)

10) 1x Pushbutton $1.74 (100pcs)

11) 1x 4017 Decade Counter $1

12) 1x Potentiometer $25.31 (optional)


Full Schematics

ce2.png
ce3.png

The circuit consists of a 555 timer and a 4017 decade counter, both of which are linked to LEDs that operate independently of the Arduino. When the user clicks the button, the Arduino just checks to see which LED is on and decides whether or not the user was able to match the LED colour to the RGB led. The 555 timer pulses at a consistent rate and delivers that electric current signal to the 4017 decade counter, which increases the count and activates the appropriate output PIN, turning on each LED one by one in a loop whenever a clock pulse is received at the 4017 decade counter's clock input.

Coding

ce4.png
ce5.png
ce6.png
ce7.png
ce8.png
ce9.png
ce10.png

Wiring

ce1.png
ce11.png
ce12.png

Follow the circuit diagrams to ensure that each wire is connected properly and in the right spot. Overall, the wiring is straightforward, although it might be congested, so keep it as tidy as possible. Feel free to make changes to the code and even add new features. If you are planning to edit the code, make sure your wiring matches the code information otherwise your code will not work.

My Tinkercard Link