Midterm Game Panel—Watch Out for the Weirdo!

Concept

For my midterm project, I made a game panel like this:

When you sit in front of the panel, the distance sensor will detect you and then switch the device from “off” to “standby”—LEDs will light up in turn in clockwise direction. When you’re ready for the game, press any button. After the start melody, the game will start.

In each round of the game, several LEDs will light up and gradually fade. You need to press the buttons that are of the same color but opposite to the lighted LEDs before the they fade away (the time is controlled by the knob in the bottom right corner). Each time you press a correct button, a tone will be played; when you have pressed all the correct buttons, a longer tune will be played.

BUT… beware of a weird color pointed by the pointer behind the panel. The rule of this color would be reversed—instead of pressing the opposite one, you should press the button that directly matches the LED.
And pay attention to the pointer—as it will rotate after each round, the weird color changes every time.

The good news is that you get three chances, indicated on the upper left side. Each time you make a mistake, one of the three red LEDs will blink along with the lights you mistouched or missed, and then go off; meanwhile a tune will be played.

Circuit Schematic

Program

Behavior

The main part of the game consists of 11 LEDS and 8 pushbuttons of four colors. Besides, two potentiometers are used to control the volume and the speed of the game respectively. The distance sensor is used to detect if a player is present so that the device will be turned on. In addition, because the pointer needs to rotate 360°, a continuous rotation servo is used instead of a standard one. With only 20 pins, Arduino Uno can’t connect to all of the above, so I got an Arduino Mega instead.

Problems

  1. Several holes on the board do not match precisely with the size of LEDs, so it was hard to fix them onto the board.

    the board

  2. Too many wires are needed to connect all parts of the device, so it is very messy behind the panel and some of the LEDs and buttons did not work so I had to redo these parts.

    behind the panel

  3. Because the continuous rotation servo cannot rotate to a specific angle, instead I had to control the time and speed at which it rotates, which took great amount of time and is still kind of inaccurate.
  4. The distance sensor is sometimes not accurate either. I guess I could place it on the top of the panel rather than at the bottom so that it won’t detect the table.

Despite these problems, the game is still fun! Watch out for the Weirdo!

The first two mistakes were that I forgot to deal with the weirdos (blue/green) reversely; the last one was timeout. I also changed speed and volume in the middle.

Lessons Learned

I realized that there are so many details that I should pay attention to:

  1. I should have attached larger control knobs to my potentiometers which could lead to better feelings of control.
  2. I could have used the female pin header instead of jumper wires to connect to the distance sensor so that the circuit would be more secure.
  3. If there were panel mounted pushbuttons and solid wires of four colors, I would have used them instead.
  4. To create better game experience, I should also make the panel higher and tilted backwards.

Leave a Reply

Your email address will not be published. Required fields are marked *