Skip to content

simple car game on 16 x 2 LCD screen from Arduino Starter Kit

License

Notifications You must be signed in to change notification settings

jemcik/arduino-car-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

The Game

LCD 16 x 2 display is a road, it has 2 lanes, car's lane can be changed by buttons, car is located in the first LCD column, display is constantly shifting to the left, and generated obstacles are moving toward car, speed is increasing up to some value while the game remains playable, after collision with the obstacle game is over, enjoy :)

Game video
20231017_114454.mov

Project is based on Arduino Starter Kit parts and its 16 x 2 LCD screen

You will need:

  • Arduino board (UNO etc.)
  • LCD screen (16 x 2)
  • 2 pushbuttons
  • resistor (220 Ohms)
  • piezo capsule (optional)
  • potentiometer (10kOhms) to adjust screen contrast (optional, ground V0 pin for max contrast)

Communication with LCD is based on 4-bit lightweight library that is included in the repo.

Wiring

LCD:

  • VSS to ground
  • VDD to 5V
  • V0 to potentiometer signal leg or to the ground
  • RS to digital 12
  • R/W to the ground (0 for write)
  • E to digital 11
  • DB4 to digital 7
  • DB5 to digital 6
  • DB6 to digital 5
  • DB7 to digital 4
  • LED+ to 5V through 220 Ohms resistor
  • LED- to the ground

Buttons:

  • left button to digital 2 and to the ground
  • right button to digital 3 and to the ground
  • piezo to digital 8 and to the ground
  • potentiometer to 5V, ground and V0 (mentioned above)

wokwi link to wiring: https://wokwi.com/projects/378699721443912705

Screenshot 2023-10-16 at 03 29 47

About

simple car game on 16 x 2 LCD screen from Arduino Starter Kit

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages