The Raspberry Ladder Board – Part 2

Last month I wrote about the Raspberry Ladder Board and it appeared in the MagPi magazine too! This month I’ll finish it off with a full board description and some more software.

(And if you don’t have one yet, then get yourself over to Tandy and get one 😉

Firstly, please update the software by running the commands:

cd ladder
git pull origin

or if you are starting from scratch:

cd
git clone git://git.drogon.net/ladder

which will pull all the software.

The new programs are a “cylon” LED sequencer written in both BASIC and C – the BASIC version will display a copy of the ladder board on the screen.  reaction – another program to test your reaction time, and simon, a “Simon Says” game where the computer generates a sequence of lights and you need to copy them using the buttons with the sequence getting longer and longer…

There are also library template files for C, Bash and BASIC to help you get going with your own programs – see ladderSetup.c, ladderSetup.sh and ladderSetup.rtb respectively. There is a Makefile too which will generate the C programs – the original Ladder game program and the Cylon LED sequencer.

The BASIC version of cylon also creates  a “mimic” display on the Pi’s screen too.

Do read the programs to see what they do, and please change them and write your own!

All the knowledge about the GPIO pin numbers for the LEDs and buttons in contained in the setup files mentioned above, or refer to the quick table below: (The wPi pin numbers are wiringPi pin numbers and will work on either a Rev 1 Pi or a Rev 2, if using the native BCM_GPIO numbers, then be aware that some of them changed from Rev 1 to Rev 2).

BCM Pin wPi Pin LED Button wPi Pin BCM Pin
17 0 Red D/4 13 9
18 1 Red
21/27 2 Yellow C/3 12 10
22 3 Yellow
23 4 Green B/2 10 8
24 5 Green
25 6 Blue A/1 11 7
4 7 Blue
0/2 8 Green Man
1/3 9 Red Man

You’ll need a copy of my BASIC interpreter to run some of these, fetch it by going here: https://projects.drogon.net/return-to-basic/ and following the directions. New examples are welcome to be added into the library at any time, please send your creations to projects@drogon.net and have fun!

Comments are closed.