Introduction: LED Game: Color It Blue
In this LED game, players use a joystick to make the LEDs blue. A light in the middle lights up blue, and players must either turn the left half or right half blue. A yellow light turns one of the LEDs on randomly, and players must move their joystick to the left or right depending on which light turned yellow. If the light in the middle turns yellow and there is no blue light, players must press the button on the joystick to turn it blue. If a player fails to do this, the LEDs turn red indicating a wrong move.
This Instructable will guide anyone in making this really cool game.
Step 1: Gathering Materials
For this game the following materials are needed:
- LED strip with 20 LEDs
- Computer that has Arduino installed
Cable to connect Arduino to computer
Step 2: Setting Up the Game
Using wires and a breadboard, connect the Joystick and LED strip to the Arduino.
- Connect 5V on the Arduino to 5V on the breadboard.
- Connect GND on Arduino to ground on breadboard.
Setting up the Joystick:
- Connect the GND on joystick to ground on breadboard.
- Connect the +5V on joystick to 5V on breadboard.
- Connect VRx on joystick to analog pin A0 on Arduino.
- Connect VRy on joystick to analog pin A1.
- Connect SW on joystick to pin 2 on Arduino.
Setting up the LED strip:
- Connect the GND on LED strip to ground on breadboard.
- Connect the +5V on LED strip to 5V on breadboard.
- Connect the middle wire on LED strip to pin 6 on Arduino.
Step 3: Putting the Code Onto Arduino
Copy and paste the code attached to Arduino on a computer. After connecting the Arduino to the computer, upload it.
Step 4: Playing the Game
- A blue light will turn on in the middle of the LEDs
- A yellow light will turn on a random LED
- Hold the joystick with the wires pointing down.
- Move the joystick to the left if the yellow light is towards the left of the strip to turn it blue.
- Move the joystick to the right if the yellow light is towards the right of the strip to turn it blue.
- If the middle LED turns yellow, press the button on the joystick, so it lights up blue.
- If the player moves their joystick in the wrong direction, the LEDs will light up red.
- Play to see how many times you can move your joystick in the correct direction.
The attached video shows how the game works.
Participated in the
Make it Glow Contest 2018