Introduction: "Color Match" (Reflex Game)

Intro:

For my schoolproject I wasn't sure what to make, but after some thinking, I decided to make a reflex game. We are a gameschool after all. We had to make something interactive and unique, so a game would be perfect! I am happy how everything turned out and I will hope you will enjoy the journey as well!

So with this product I will show you how I made my own game “Color Match” on the Arduino. Well before we start I have to say that 1 little part of the game doesn’t work because something is wrong in my code so you can take my code and try to solve it, but we will get there.

Step 1: How Does It Work?

So basically I have made an 1 versus 1 game where you have to be the first one who got 4 points. How can you earn the points? Well it is simple, you have to have the best reflexes. You got 3 different colors (red, green and blue) on one side and the same counts for the other side. On one side one of the three colors (LEDs) begins to flash for a short moment, let’s say red flashes. After that on the other side there will flash one of the three LEDs as well and if that is red (just like the flash from the other side) you have to be the first to press the button and who’s the first gain a point. But if green or blue flashes, you shouldn’t press the button because otherwise you will lose a point (this is the part that doesn’t work for me). So to keep it simple, you just have to press when the colors match and don't press if the colors doesn't match. The first one who reaches the 4 points wins the match.

To keep it interesting, there is one more I haven't told about the game. When the green light flashes on 1 side and it does as well on the other side and the green side presses the button first, he will gain 2 points. The same counts with the blue side but instead of the 2 green led's there should be 2 blue led's flash.

Step 2: The Materials

For this step I am going to describe everything you should need to make this project yours!

What I used:

Technology

- 1x Arduino Uno

- 5x Green LEDs

- 5x Blue LEDs

- 2x Red LEDs

- 1x Yellow LED

- 2x Small buttons

- 37x power cable (about 40 cm long each)

- 1x solder board

Materials

- Wooden box (more about this in "Building Your Project")

- Wooden triangle (width: 10 cm, length: 10 cm, height: 7 cm)

- 2x Wooden cylinder (for buttons)

- Paint (white, blue, green, red, orange and yellow)

These are all the materials I have used to create this product. What where to use will be all explained here below. When you want to use something different then I have, sure go ahead! A bit of your own creativity can't hurt. You could go all out with your imagination.

Step 3: Building Your Project

In this step I am going to show you how I made my box for the game. I began with some rough sketches so I knew what I wanted to make and how big everything needed to be. I got enough space in the box itself to cover all the power cables and the arduino.

1. Begin with some sketches. In this step you should sketch how you would like your size of the box, where you want the LEDs and where to put the buttons. I shouldn't make your box to small because otherwise you haven't got enough space to put everything in your project.

2. Put your sketches on the wood so you know where to cut, saw etc. I have made a box with size 34 cm (length) x 26 cm (width) x 10 cm (height). The bottom were removeable so you could slide your arduino right in there. I have made the wooden triangle from wood as well, they are 10 cm (width) x 10 cm (length) x 7 cm (height). Make a hole in the triangle (about 2 cm diameter) so the power cables go through there.

3. Drill the holes for the buttons and LEDs. I have made tiny holes for my 13 LEDs, I made it so the LEDs couldn't fit through the hole but only the pins from the LED. For the buttons I made a hole where my big buttons could go through, I have made the wooden buttons from a broomstick (the diameter is 2,8 cm).

4. Attach the triangles. I have attached the wooden triangles in the middle of the sides of the box (the width sides).

5. Before you start here (go to part 5 from Technology) Glue the wooden pieces together. Not much to say here, the bolt part gives it away. At this moment I have glued my wooden top to my other parts of the box.

6. Time to paint your project. You can give it whatever colors you want, after this part you have to wait a little before it's dry. try to come up with some crazy cool ideas.

7. LED's attach the light. After the paint is dry, you can attach all the LED's in the holes you made, wait till the glue is dry and if you don't like to decorate your LEDs you could go straight to the technical part.

8. Decoration. If you would like to decorate your LEDs, go ahead. Make something you desire but be sure you could still see the light of the LED.

Step 4: Technology

We finally made it to the last part, for me this is the most fun part but the hardest part as well. Now we are going to make some electric circuits and we need to program some stuff. I have watched a lot of tutorials online and I highly recommend you to do the same. Online there is a lot of tutorials that could help you further than I can.

But let's go further with the process!

1. Watch some tutorials and make some basic stuff with your arduino. I started out making a LED flash on and off. After that I tried to make the LED go on after I pressed the button and that's how I started with this whole project. This video helped me a lot with my specific project.

2. Trying your prototype on a breadboard. If you got your idea you should try to make your own electric circuit. If you want to use mine, you just have to follow the cables from my cable schedule.

3. Coming up with an overview of your cables. It is very important to create a good schedule for all your cables. You know, if there are going several cables to the + then you should colors those all the same and the same counts for the - . This is a really important step, because if you take everything out of your breadboard, you can still see which cable has to go where. It also helps if you are going to solder. You could do the same as me and create a schedule on paper, or you can make one online with Fritzing. I haven't build it with Fritzing because it felt better to make it on paper (for me atleast).

4. Making the cables. Let's get to the last few parts of the project. You have to make some power cables that you could attach to an arduino and connect it to the LEDs and the buttons. I had some male to male cables that could plug into the arduino, I have cut them in half and stripped the wire so I can solder it to my other power cables.

5. Connect the buttons. So before you solder everything together, you first have to solder a few cables to the buttons. you should put the buttons through a solder board first and then solder it to the cables. Now you can lay the solder board with the buttons and the cables through the hole you mate in the triangle. If you have glued the solder board to the triangle you can go back to part 5 from the "Building Your Project".

5. Time to solder. Now it is time for the last physical part! Now you should solder everything together. If everything went alright you should have a cable schedule by now, that means you can easily see what has to be soldered with which cable. Good luck!

6. Coding. For coding, I have wrote the biggest part myself and got some help with the code from the video in part 1 of technology. I can't describe everything what I have done, but I will leave the code below. If you have troubles with your code, I could try to help out!

For now, if you don't want to program, just copy the code and connect your arduino to your computer. Send the code to your arduino and it should work!

Thank you for reading this guide and I wish you all good luck with making this game!