Racing Game

Race the clock in this game of chasing LEDs!

Categories: Intermediate


Every year Rice University celebrates Beer Bike. The event is full of spectators and fun, and is centered around a bike race. Beer Bike was the inspiration for this game where an LED races around a track as the user quickly presses the button, racing the timer.


The game utilizes a PocketBeagle for the program processing, a shift register to control the LEDs, and the Adafruit 0.56" 4-Digit 7-Segment Display with I2C Backpack.

The shift register is soldered onto the back of the "race track" so the front is more aesthetically pleasing.

Shift Register

Fritzing Diagram

The Fritzing diagram for the device is shown in schematics.


Gameplay proceeds as follows:

  • 1. User twists potentiometer to set the difficulty of the game. The more lights that are illuminated, the higher the difficulty setting.
  • 2. The user presses the button to begin the game and the timer counts down from 3 seconds.
  • 3. The user rapidly presses the button to lead the LED around the "track" while the timer is running.
  • 4. Once the LED has made it all the way around the track, the final time is displayed.

Gameplay is shown in the video below:

Comments are not currently available for this post.