The Project: Dino Runner on 16×2 Character LCD

By | September 30, 2026

We often buy developer kits with grandiose industrial ambitions, only to leave half the shields sitting in parts drawers gathering dust. Recently, while clearing off my workbench, I grabbed an Elegoo Uno R3 clone paired with a ubiquitous 16×2 LCD keypad shield. The original plan was a quick telemetry display, but old gaming instincts took over instead.

Thank you for reading this post, don't forget to subscribe!

Why monitor sensor feeds when you can squeeze a high speed endless runner into 32 dynamic character cells?

What You Need

The best part about this build is that there is zero breadboarding required. It is pure plug and play hardware:

  • Microcontroller: Arduino Uno R3 or any clone (Elegoo, Inland, generic CH340 boards all work identically).
  • Display Shield: Standard 16×2 LCD Keypad Shield featuring the 5 button analog ladder and an HD44780 driver.
  • Cable: USB type A to B cable for programming and power.
  • Small Screwdriver: Essential for adjusting the contrast trimmer pot on the shield if your screen displays blank blocks on first boot.
  • Optional Piezo Buzzer: Any small passive or active buzzer wired between digital pin 3 and ground for instant audio effects.

The Project: Dino Runner on 16×2 Character LCD

Remember the offline Chrome dinosaur that keeps you company when your internet drops? This is that exact spirit, packed into bare metal C++ running on an ATmega328P. Instead of full pixel buffers and GPU pipelines, the entire game engine works inside the 5×8 pixel custom character memory of an HD44780 compatible LCD. Every single frame, jump calculation, and collision check executes in real time without external gaming libraries.

Dino Runner

Key Specs and Technical Features

  • Display Architecture: Standard 16×2 parallel LCD running on digital pins 8, 9, 4, 5, 6, and 7.
  • Analog Ladder Input: Full five button control multiplexed onto a single analog pin (A0) using an onboard voltage divider network.
  • Custom CGRAM Pixel Art: Hand crafted 5×8 bitmaps for the runner, ducking state, ground cactus obstacles, and a pterodactyl predator.
  • Persistent EEPROM Storage: High scores survive power cycles and USB disconnects, complete with validation bytes to prevent random flash garbage from claiming a fake world record.
  • Adaptive Acceleration: Game ticks automatically speed up every 25 points, testing your thumb reflexes down to a frantic 90 milliseconds per frame.
  • Passive Audio Ready: Tone generation routines are mapped to digital pin 3, so plugging in a small piezo buzzer instantly adds jump chirps, ducking tones, and crash feedback.

How to Play

The rules are brutal and simple, just like the arcade classics.

  • Jump (UP or SELECT): Clears ground hazards on row 1. Timing matters because you only hang in the air for three clock frames.
  • Duck (DOWN): Duck under incoming flying pterodactyls on row 0. We redesigned this sprite specifically because my eyes kept mistaking earlier air hazards for collectible floating hearts. They are not hearts. Do not hug them.
  • Reset High Score: Hold LEFT during power up or while pressing the hardware RESET button to clean the EEPROM register back to zero.
  • Restart: Tap any button on the shield once the game over screen flashes.

Launching the 16×2 Games Repository

This runner is actually the first entry in a broader project I am kicking off: a dedicated repository for lightweight, single shield Arduino games.

https://gitea.yaylali.uk/kemal/16×2-Games

Most microcontroller code samples for character displays stop at printing static text or showing temperature readings. The 16×2 shield is dirt cheap, robust, and sits on the desks of thousands of makers and students worldwide. Giving it real, responsive mini games with zero extra wiring makes hardware hacking immediately fun for beginners and experienced developers alike.

The full sketch is live, documented, and ready to flash. Grab your board, adjust your contrast potentiometer until the pixels pop, and let see who can hold the record without crashing into a low flying pterodactyl.

Leave a Reply

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