I was part of a bigger project but there was a delay. So I decided to do something with my old Arduino kit. I never used the LCD screen before. So, I soldered the pins into the screen (I learnt soldering for the first time).
Initially I copied the code from an online manual and uploaded it. It only displayed text, moving right and left. This was when I was introduced to the LiquidCrystal library. I wrote a code which made the number "0" bounce around the screen, it was pretty fun. That was when I thought of making something a bit more complex, a game. I googled for lcd games on arduino and found only 3 games, 2 of which worked for me. The code for these games were way too complex for me to understand, so I decided to create an easy game.
Connect the lcd pins to the arduino with wires as shown in the schematic below.
I used a 10k potentiometer to adjust the contrast and adjusted it for the contrast I wanted. I measured the resistance between the pins with a multimeter and used appropriate resistors (1k and 10k ohms in series) for the VO pin of the LCD.
Place a push button on the breadboard and connect the input wire to pin 8 on the arduino. Upload the code to your arduino and you are ready to go.
Note: Use the button resistor in pull-down mode, as shown in the schematic.
In this game, you are a football player with the ball at your legs. You will have defenders approaching you, and you should simply dodge them.
After the intro, hit the button when asked to. When the defender comes close enough, hit the button to jump. The next defender will approach with a higher speed, and this continues for 10 defenders.
PS: I initially used "0" as the control, and "1" as the obstacle. As the 2018 FIFA World Cup is going on and being a Messi fan myself, I decided to change the theme.
I made the glyphs for the player and defender using an online generator, the link provided here: https://omerk.github.io/lcdchargen/