LED Game

by 635114 in Circuits > Arduino

518 Views, 1 Favorites, 0 Comments

LED Game

image0.jpeg

This is an LED game that you can play in which you press a button and if the LED and the RGB led are the same color, you get a point. If you get to five points you win, and the game restarts after ten seconds.

Supplies

5 x LEDs (Different colors) Link

1 x RGB LED Link

1 x Push Button Link

2 x Potentiometer Link

1 x LCD Link

1 x Decade Counter (4017) Link

1 x NE555 Timer Link

4 x 220 Ohm Resistor Link For resistors

1 x 570 Ohm Resistor

1 x 10uf Capacitor Link

1 x Arduino UNO and Cable Link

2 x Breadboard Link

Many Jumper Wires Link

Lay Out Components

Lay Out.PNG

Lay out your components on the breadboards, and example of a decent layout for this project is shown here in an image.

Schematic

Final_Project_schem.jpg

This schematic was created alongside the other images and steps in the project. If you are more familiar with working with schematics, rather than images feel free to use this to build the circuit off of.

Wire Up the LCD

LCD.PNG

Wire up the LCD in the same way as shown in the image provided, if it makes it easier you may also color code your wires. The LCD allows us to display the users score on in and tells them if they win when they reach 5 points.

555 Timer

555 Timer.PNG

Attach the wires of the 555 timer as shown in the image, feel free to color code them to match the image provided. The 555 timer creates an oscillating wave that allows the lights to continuously move by sending pulses to the decade timer. The speed of the number of waves is controlled by its potentiometer.

Decade Counter and LEDs

Decade.PNG

Wire up the Decade Counter and LEDs as shown in the image provided, color code the wires if it makes it easier to match it to the image. The decade counter takes the wave from the 555 timer and sends that power to the 5 LEDs so that they count 1, 2, 3, 4, 5 not in random order.

RGB LED

RGB LED.PNG

Wire up the RGB LED in accordance with the picture shown, feel free to use the same color wires as the ones shown in the picture to make it easier. The RGB LED changes color randomly so that the user does not know which color is coming up next, to make the game more fun.

Push Button

Button.PNG

Wire up the push button as seen in the picture provided, use the same color wires if it makes the wiring easier for you. The purpose of the button is for the user to play the game, when they press it and both the LED lit and the RGB color match they get a point. This is wired directly into the arduino.

Code

Download the code attached in order to run the game, install the Arduino application and plug it in the computer, then compile the code, and the game should work. If you have any problems at this point it is most likely due to the wiring so go back and redo steps 1 through 6 to make sure that all the wiring is correct.

Downloads

Test and Present !!!!

image_50460417.JPG

Now that you have assembled the project and it is working, test it out, have fun and play with it. Show your friends and family your newfound engineering skills and use this as a base to continue your passion for further projects.

Downloads