Arduino Light Game

Disclaimer

This project is a slightly changed version of https://www.instructables.com/id/Arduino-LED-Rock...

Please go check out the original work.

================ separation line ================

Introduction

This is an game made from Arduino LEDs.

Basically, you have five lives.

The LEDs would lit up one by one.

The whole purpose of this game is to press the button when the lights reach the middle one.

If you succeed, you 'level up', the middle light would blink twice to show you got it.

If you fail, you 'lose a life'

The more you 'level up', the faster the lights gets.

If your life reaches zero, the LED which you pressed wrong and the first LED would light up for a while, indicating a 'Game Over', then the game restarts.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Prepare Your Supplies

- Arduino uno

- Breadboard

- Usb line

- 10 jumper wires

- 9 LEDs

- 9 resistors

- A button

Step 2: Connecting It Up

It kind of looks like the picture above.

Basically...

LED1 -(connects to)> Pin2

LED2 -(connects to)> Pin3

LED3 -(connects to)> Pin4

LED4 -(connects to)> Pin5

LED5 -(connects to)> Pin6

LED6 -(connects to)> Pin7

LED7 -(connects to)> Pin8

LED8 -(connects to)> Pin9

LED9 -(connects to)> Pin10

Button -(connects to)> Pin13

Don't forget to connect GND to the ground rail

Step 3: Put in the Code

Step 4: Preparing to Make the Exterior

This is the suggested items you should prepare:

- A little box, approximately the size of your Arduino.

- Some colored paper

- Color pencils and marker to draw

- You could prepare a utility knife to cut out the shape

- Piece of plastic

- Tape

Step 5: Cutting Out Spaces and Decorations

- Cut out nine little spaces to put LEDs

- Cut out a circle to place the button

- Cut out a little square at the sides (so you could connect the usb line)

- Draw on the front

- Stick color paper to the side to cover up the box

Step 6: Putting It All Together

- Place in the LED lights

- Tape piece of almost-transparent plastic over the LEDs

- Place in the button

- Place Arduino in box

- Connect everything up

Step 7: Finish!

Close the cover up, and connect the usb line.

Run the code, try if it works or not.

If you 'Lose a Life' , gets an 'Game Over', or 'Levels up' you could see it in the Serial Prints

Play till the light go so fast you cannot see which one is actually moving!

Enjoy!

Be the First to Share

    Recommendations

    • Instrument Contest

      Instrument Contest
    • Make it Glow Contest

      Make it Glow Contest
    • STEM Contest

      STEM Contest

    Discussions