This is a fun game that can quite easily be created with a Pi, a breadboard, some LEDs, resistors and jumper leads.

The aim of the game is to climb out of a well using a ladder. There is a flashing LED representing your position on the ladder, and by pressing the button, you move up the ladder. However, you can only move when the LED is on. If you push the button to try to move up when the LED is off, then you slide back down to the bottom again! The hard part is that the led flashes less and less the higher you get up the ladder, making it easier to keep the button pushed for too long when near the top, causing you to slide back down again. Additionally, if you don’t move by pushing the button then eventually you start to slide down anyway! Sounds like fun? Give it a go!

You will need:

  • 12 x LEDs (4 x Red, 4 x Yellow and 4 x Green)
  • 12 x 270Ω resistors
  • 1 x PTM button
  1. Wire up the circuit as per the diagram below. (If you have a breakout board, feel free to use it!)

  1. Finally, the software. In LXTerminal type, one line at a time:

mkdir ~/ladder

cd ~/ladder


cc -o ladder -Wall -I/usr/local/include -L/usr/local/lib ladder.c -lwiringPi -lm

sudo ./ladder 


  • Line 5 tells the Pi to run the code, so everytime you want to play this game, navigate to this Directory (line 2), and run the code on line 5!