Hardware ladder game
Eben and I are away from the office for a few days while we attend Poptech in Reykjavík. I’ll be doing my best to keep things updated here in-between attending panel discussions, meeting some Icelandic educators, hackers and Raspberry Pi enthusiasts, and visiting the magma chamber of a dormant volcano called Þríhnúkagígur (try saying that after one too many glasses of Brennivín) in one of those window-cleaners’ cradle things. I am starting to think that I may have been a little foolhardy in agreeing to this. I get vertigo at the top of the escalator in Leicester Square tube station.
While I am contemplating plummeting window-cleaners’ cradles and the usefulness of ladders, here is an easy but very satisfying little hardware project from Gordon Henderson at drogon.net. It’s another great way to start getting to grips with the Raspberry Pi’s general purpose input/output (GPIO) pins, and you’ll end up with a little physical LED game representing a climb out of a well (or a 400ft magma chamber) using a ladder – you have to press a button to climb the ladder, but only when the LEDs are flashing, or you’ll slide back down to the bottom again. Gordon used the SK Pang starter kit for Raspberry Pi, which we rather like; it comes with a Raspberry Pi cover with breadboard (breadboard, for beginners, is a prototyping board you can plug components into without using solder), LEDs, jumper wires, some miniature switches, some resistors and a 16-bit I²C IO expander. You can use the kit, or buy the parts individually from your local electronics shop.
Gordon’s hardware instructions are here – and there’s a video too. (See below.) Software and a theory of operation are yet to come, so keep an eye on his website (I’ll add links here when they’re available).
20 comments
Duncan
Very nice, loving the RPi starter kit from SK Pang, will be ordering one of those I think!
Kev
Ordered one at weekend from Amazon for £21. It was delivered less than 3 minutes after seeing this article. Now I’ve no excuse for not using it.
Kev
CORRECTION: The one I ordered is the Kit A, which has fewer components and no IO extender chip. Still perfectly good as a starter kit at the price.
The link in this article points to the more copious Kit B.
Darren
Most people won’t need the IO extender so kit A http://www.skpang.co.uk/catalog/starter-kit-for-raspberry-pi-a-p-1070.html is probably the better kit for most people.
Alexander Langer
Iceland? Oh how I envy you!
Greetings to Björk, Gus-Gus, etc. ;-)
Andrew
Can the I2C ports be accessed atm? I thought only the GPIO ports were available?
Gordon Henderson
Thanks for the comments – it was good fun re-creating the memory of that game I soldered up all those years ago! I have some thoughts for a few others things to do on that same board – 12 LEDs and a button … Seems a bit limiting, but I think lots of simple little things like this will be good – relatively easy to make then you have a bit of a base for lots of other things!
(until you run out of ideas, then tear it down and start again! :-)
-Gordon
Kev
Look forward to anything you can think of. By the time we’ve exhausted all the possibilities of the board we should be ready to buy extra pieces to get more adventurous.
In theory…
Dave G
Gordon, I am by no means an electronics person, but I was wondering about your comment: “12 LEDs and a button … Seems a bit limiting…”. Could you use the gpio pins in a binary sort of way? 4 bits (or gpio pins in my mind) would allow you to count up to 16. I am guessing it would require an additional circuit to convert it to discreet pins to power on/off the leds.
Does this make sense? Or am I just complicating this unnecessarily?
-dave
reiuyi
I’m not OP; a 4-to-16 decoder (such as 74 154, part of the 74 logic series) is an additional chip, yes. It’d allow controlling 16 leds with just 4 IO pins. The 74 series are usually really cheap and widely available.
Such line decoder chips will require a line or two of python, though it’s a fun addition to a project, I believe
AndrewS
The obvious thing to make when you have red, green, yellow LEDs and a couple of buttons is to build a traffic lights / pelican crossing simulation ;-)
One of the first things I did with my Arduino a few years ago.
Wombat
Shame im snowed under so cant play at the mo…..
But 7 led’s and a button = electronic dice!
Wombat
Which would be called a Diced PI
Ibanezjem
Only need 4 outputs for a simple die. Use all twelve for 3 dice, or multiplex in code for YAHTZEE!
Andy Piper
I actually made a short video of Gordon’s Pi project at the recent Field Studies Hackday – you can see it in action on my YouTube channel – http://www.youtube.com/watch?v=_-ncDclqQUg
Ingibjartur
Velkominn til Íslands!
Just finishes ordering my Pi
I happened to walk by the opening party by the pond and it looked like you guys were having good time :)
Have a nice stay
kspn
This is so easy that it is getting me thinking about home automation projects using a Web interface and a RasPi as the central ‘node’ :)
tykus
What is the likelihood of completely bricking your RPi using the GPIO’s – I have done electronics as a second-level student, but not since then (we’re talking 20 years ago!!!)
I’d love to try a few hardware projects, but would fear for my much loved Pi…
Dave
Opto-isolators !!
tykus
Thanks for replying Dave. As I had guessed, my brief intro to electronics was brutally exposed by the very first reply to my question! I have looked at a few sites which explain how opto-isolators work which was great, but then went beyond what I could comprehend…
I’ll see if I can follow the tutorials in MagPi and work up to the good stuff!
Comments are closed