Lights Game

by Ashton9 in Circuits > Arduino

120 Views, 0 Favorites, 0 Comments

Lights Game

IMG-1608.jpg

People need light almost every day. Without lights, we wouldn't be able to see things so clearly, and it is also one of the most important inventions in human history. However, have you ever think of playing games with lights, and won't get blamed by your parents for wasting electricity? If not, I will teach you how to make a light game in this project. There are some changes I made that are different from the original project. First, I switch the LED matrix to LCD and change the small button into the bigger one. These two changes are made because I already have those 2 materials and I don't need to buy them. Lastly, I change the shining time from 50 milliseconds to 100 milliseconds because it was too fast.

Original idea: https://www.instructables.com/Carnival-Lights-Game...

Caution: The positive and negative areas are upside down in the pictures, so just ignore the + and - sign.

Supplies

1 Arduino

1 Breadboard 9 LED Lights with different colors ( I use each 2 red, green, yellow, and green. And a white LED Light)

9 Brown resistors

1 Blue resistor

Jumper Wires

1 LCD

1 Button

Put the LED Lights, Resistors, and the Jumper Wires on the Breadboard

螢幕擷取畫面 (2).png
螢幕擷取畫面 (4).png
螢幕擷取畫面 (6).png
  1. First, put the LED Lights on the breadboard. It's better to use different colors
  2. Next, put the resistors above the lights. One side goes to the same column of the negative leg of the LED, and the other goes to the negative row
  3. Next, place the jumper wires on one side on the same column of the positive leg of the LED, the other side goes to the digital hole (1-13)

Make the Wire of the LCD

螢幕擷取畫面 (8).png

1. Take 4 wires and put each of them on one hole on the LCD

2. The Wire for VCC goes to the positive row

3. The wire for GND goes to the negative row

4. The wire of SDA goes to the SDA hole on the Arduino

5. The wire of SCL goes to the SCL hole on the Arduino

(Since the LCD on Tinkercad doesn't have SCL and SDA, so I just choose two random holes, but you will find those two on your LCD)

Put the Button on the Breadboard

螢幕擷取畫面 (10).png

1. Place the button on the breadboard (Make sure there are wires on the button)

2. Put a wire with a side on the same column of the left wire of the button, and the other side on the positive row

3. Put a *blue resistor with the *left leg on the same column of the right wire of the button, and the right leg 2 holes away from the left leg

* There's no blue resistor in the simulation. Also, the resistor cannot be placed horizontally, so I suggest you look at my description

4. *Put a wire with a leg on the same column of the left leg of the resistor, and the other leg in D2 on the Arduino

*Also this step is better to look at the description

5. Put a wire with a leg on the same column of the right leg of the resistor, and the other leg to the negative row.

Code

Downloads

Final Solution

Arduino