Arduino LCD Game




Making a great many things is very easy with Arduino microcontrollers. This Instructable tells you how to create a simple 1-button video game made from a handful of parts and Tinkercad Circuits. It is a side-scrolling jumping game. This serves as a good starting point for creating your own games from simple maker electronics.

Parts list:

  • 1 x Arduino UNO
  • 1 x LCD screen (16 x 2 character)
  • 1 x Electronics breadboard
  • 1 x 220 Ω resistor
  • 1 x Pushbutton switch
  • Solid-core hookup wire
  • 1 x USB cable

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: Assembling the Parts

The parts needed are shown in the picture above.
Start off with the Arduino unpowered. Do NOT plug in the USB cable. That will happen in a later step when it is time to program it and try the game out.

Use a long hookup wire to connect the 5V signal on the Arduino to the far left of the red row at the top of the breadboard.

Use a long hookup wire to connect the GND signal to the far left of the black (or blue on some breadboards) row at the top of the breadboard.

The LCD (Liquid Crystal Display) module has a 16-pin male header on the underside. Plug this into the breadboard as shown in the picture. All of the electronic signals that power and control the LCD go through this header.

These pins are (from left to right):

  1. GND - power ground signal
  2. VCC - positive power signal
  3. V0 - contrast adjust
  4. RS - register select
  5. R/W - read/write select
  6. E - operation enable signal
  7. DB0 - data bit 0 (not used here)
  8. DB1 - data bit 1 (not used here)
  9. DB2 - data bit 2 (not used here)
  10. DB3 - data bit 3 (not used here)
  11. DB4 - data bit 4
  12. DB5 - data bit 5
  13. DB6 - data bit 6
  14. DB7 - data bit 7
  15. LED+ - backlight LED positive
  16. LED- - backlight LED negative

Using short hookup wires, connect GND and LED- (pins 1 and 16) to the black row at the top.

Similarly, connect VCC (pin 2) to the red row at the top with a short hookup wire.

Bend the wire leads of the 220 Ω resistor (red-red-brown colored bands) and connect it between LED+ and the red row at the top of the breadboard.

Use longer hookup wires to make the remainder of the connections:

  • Connect DB7 to Arduino pin 3
  • Connect DB6 to Arduino pin 4
  • Connect DB5 to Arduino pin 5
  • Connect DB4 to Arduino pin 6
  • Connect E to Arduino pin 9
  • Connect R/W to Arduino pin 10 (or to black row at top of breadboard)
  • Connect RS to Arduino pin 11
  • Connect V0 to Arduino pin 12 (or to black row at top of breadboard)

Plug the pushbutton somewhere to the left of the LCD screen, straddling the channel running along the center of the breadboard (see picture above). Connect one of the top two pins of the button to the black row at the top of the breadboard using a short hookup wire. Connect the other pin at the top of the button to pin 2 of the Arduino.

Step 2: Programming the Arduino

At this point, you should be ready to program the Arduino and test it out.

Start by making sure that you have the Arduino software installed on your computer. Download the LCD_Game.ino file on this page to your computer and open it in the Arduino software. Make sure the board is set properly for programming (Tools → Board →Arduino Uno).

Connect the Arduino to your computer using the USB cable. This will provide power to the Arduino/game and allow you to upload your program to the Arduino.

At this point, the screen of the LCD display should light up.

Program the Arduino by selecting File → Upload (or press the right arrow button at the top of the Arduino software).

If all goes well, the LCD screen should now show the game start screen like in the picture above.

Step 3: Changing Things and Making an Arduino Game Shield

At this point you have everything working, so what more is there to do?

If you want to change the way the game works, or make a cool printed circuit board for this project that plugs directly onto the Arduino and replaces of all those messy wires, here's how to get started.

I developed this game entirely using the very cool (FREE!) online electronics simulator Tinkercad Circuits. I actually had the game fully working and tested before ever taking the Arduino out of the kit. Here's the virtual circuit for the Arduino LCD game.

You can actually play the game right in your browser without ever having to put together any actual electronics ("Oh, now you tell me"). If you want to make any changes to the game, or explore what's going on, you can copy the virtual circuit using the "Duplicate Project" button. You can then edit the source code and try out changes right there. There's also a full-featured debugger where you can step through the program line-by-line and see what's going on!

If you are so inclined, you can also make a circuit board to nicely connect your electronics to the Arduino. The project has a "Download Gerber" button that will get you the files necessary to give to a printed circuit board (PCB) manufacturer to have a custom printed circuit board made. Here's some useful info on getting that PCB made.


29 People Made This Project!


  • Indoor Lighting Contest

    Indoor Lighting Contest
  • Make It Fly Challenge

    Make It Fly Challenge
  • Growing Beyond Earth Maker Contest

    Growing Beyond Earth Maker Contest

76 Discussions


Question 2 months ago on Step 3

Hello, This is amazing. I wanted to look at the code so I could learn more about coding LCDs but when I click on the .ino file it just tries to install the Arduino.ide which I already have installed

1 answer

Question 3 months ago on Step 2

is there any code for lcd with i2c thank you


Question 5 months ago on Introduction

During the upload he wrote to me: An error occurred when transferring the sketch why?
thank you


7 months ago on Step 1

you have to add the schematic through fritzing or something buddy inexperienced people dont know how to assemble it but thanks


8 months ago

good projectbut little bit to easy for me


Question 1 year ago on Step 3

need help wiring.

cant understand the layout


1 year ago

the brightness is too much how should i reduce it.


1 year ago

can you post a better pinnout (cant really understand this one)


1 year ago

can i omit the resistor and replace it with a a potentiometer


1 year ago

can you add some images of what cable goes to what port (i am using the sparkfun redboard and am new to this. by the way, the fact that it is not arduino uno does not matter, it is the same board with a different look.)


2 years ago

I made your game a long while ago(its amazing by the way) and i remembered it a while ago and decided to improve it. I had a piezo and i wanted to add music to it. long story short i added music to it and i uploaded it. the music worked great, but the game.... not so much. the game works all right but the frame rates are about 50 frames per hour. i think i might have accedentally edited the speed of the game but have no idea how to fix it. one of you probably knows how to edit the speed of the game.

1 reply

Reply 1 year ago

How are you generating the music? Perhaps playing your notes is blocking the game from progressing at normal speed?


2 years ago

really cool one, thanks for the tutorial


2 years ago

somehow I managed to get over 395


Reply 2 years ago

İ am 10 years and I got 147 my dad got 256


2 years ago

Acil yardim edin arduino atinca programi boyle hata veriyor acil yardim edin