Press(Button); //An Arduino LCD Game

by I-have-an-idea in Circuits > Gadgets

2651 Views, 15 Favorites, 0 Comments

Press(Button); //An Arduino LCD Game

IMG_5007.JPG

Recently in Scouts, I worked on the Game Design merit badge. For one of the requirements, I built this game using Arduino that is based on the LED Rocker Game.
The point of the game is to score the highest amount of points possible. At the start of the game, you will need to press the button to start, then there will be an arrow in the middle of the screen. There is another arrow below it that moves across the screen. When the arrows match, you need to press the button and hold it down until the green LED lights up. You will then get a point, and the game will speed up.

Supplies

  • Arduino Uno or Nano
  • Breadboard (small if you are using the Arduino Uno, medium if you are using Arduino Nano)
  • 16x2 LCD screen compatible with Arduino
  • A red and a green LED (one each)
  • A pushbutton switch
  • Breadboard wires
  • A 10 kilo ohm resistor
  • A potentiometer
  • Two 220 Ohm resistors (you might need another one for your LCD screen depending on the type)
  • Optional: 3d printer to make a case for the game

Solder the Pushbutton and the LEDs

IMG_4771.JPG
IMG_4772.JPG

Cut up some breadboard wires and solder them to the pushbutton and the LEDs. You can make a common ground for the LEDS.

Optional: Case for the Game

IMG_4773.JPG

Here are the files for a 3D printed case for this game.

This was originally designed for the Arduino Uno, but can be used with a Nano.

Connect the Rest of the Circuit

Screenshot 2020-05-27 at 11.46.19.png
IMG_4776.JPG
IMG_4775.JPG
BEA58A95-B7AE-4060-A332-5B58952C6BF2.jpeg
2B302307-A239-48F1-8D60-1A7E60941466.jpeg

Connect the rest of the circuit using the circuit diagram.

The connections are:

  • Arduino 5v to breadboard +, and Arduino GND to breadboard -
  • LED common ground to breadboard ground
  • Red LED to pin 3, and green LED to pin 4
  • Breadboard + to button, and the other side of the button to pin 6 and ground
  • Breadboard + to potentiometer terminal 1, and potentiometer terminal 2 to LCD ground
  • Breadboard + to LCD VCC
  • Potentiometer wiper (middle pin) to LCD contrast pin
  • LCD Register Select pin to Arduino pin 7
  • LCD RW pin to breadboard -
  • LCD E to Arduino pin 9
  • LCD D4 to Arduino pin 10
  • LCD D5 to Arduino pin 11
  • LCD D6 to Arduino pin 12
  • LCD D7 to Arduino pin 8
  • LCD LED + to breadboard +, LCD LED - to breadboard -

The Code

Upload the code to the Arduino.

Feel free to change up the code if you want, it is a rather simple program.

Play the Game!

IMG_5008.JPG
IMG_5010.JPG
IMG_5009.JPG

Press the button when the pointer is in the middle and hold it down to light up the green light and advance to the next level.

Thanks for checking out this Instructable!
If you liked it, please consider voting for me in the 1,000th challenge.

For those who were wondering, the title is formatted like a line of Arduino (C++) code.