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!
Gordon, I contacted you a couple of weeks ago about “cloning into Ladder…unable to connect … connection timed out” and you had a problem on your firewall and you fixed it. I’ve just had to start again as my RPi Rev 1 had a fault and I’m just re-starting with an RPi Rev 2, getting the same “connection timed out” problem again, please could you help again.
Hm. There hasn’t been any changes/issues my side of things that I’m aware of… Just tried it from a remote site I’m currently working on and I could checkout the ladder code OK..
-Gordon
Thanks Gordon, just tried it again and it works; tried the test software, the blue LEDs and the 2 small ones don’t light up, not sure what to do about that; I’ve checked the board and can’t find any shorts!
See if you have the I2C and/or the SPI modules loaded (although that might only affect the small LEDs).
If you have a multimeter then check for shorts, or opens… The place I’ve seen 1 or 2 people go wrong is soldering the gpio connector – lots of pins next to each other…
It should be relatively easy to see where the tracks go though if checking with a multimeter.
-Gordon