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:

git clone git://

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, 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: and following the directions. New examples are welcome to be added into the library at any time, please send your creations to and have fun!

A visit to The National Museum of Computing

Last weekend (Saturday the 2nd to be precise!) I visited The National Museum of Computing (aka TNMoC) which is based in the grounds of Bletchley Park.

This was my 2nd visit and I was especially interested in seeing the newly rebooted WITCH in operation and I wasn’t disappointed!

However, first things first. TNMoC is situated in the grounds of Bletchley Park and as well all know, Bletchley Park is home to the WWII code-breakers where they built the machines that decoded the Enigma, (Bombe), Lorenz (Colossus), and who knows what other ciphers and codes during WWII.

It’s important to note that TNMoC is a separate entity to Bletchley Park! They pay rent to Bletchley Park for the bunkers they occupy. That means you pay separately to get into TNMoC and an entry ticket to one does not give you entry into the other.

Currently (Dec. 2012) it’s £12 to get into Bletchley Park and £5 to get into TNMoC, however a slight confusion is that the Colossus and Tunny galleries are part of TNMoC even though they may appear to be part of Bletchley Park, and if you want to visit these, then there is a £2 surcharge on-top of your Bletchley Park fee – but that’s redeemable against the full price of a ticket into TNMoC (you then just pay £3).

Confused? I was, and so are many others, so to recap:

  • Entry to Bletchley Park to see the Enigma and Bombe displays is £12.
  • Colossus is owned by The Colossus rebuild company and is on long-term loan to TNMoC.
  • Entry to TNMoC is £5.
  • If you want to see the Colossus and Tunny galleries then it’s included in TNMoC entry but it’s a £2 surcharge if you just want to see the Bletchley Park (Enigma and Bombe) exhibits.
  • If you paid the £2 surcharge to see the Colossus, and subsequently want to see TNMoC, you only pay the balance of £3 to get into TNMoC.

There is also a £3 car parking fee on-top of that, but I’m not sure if that just applies to BP or to either BP or TNMoC.

So, back to TNMoC:

The WITCH computer is the oldest running digital computer on the planet and I wanted to see it in operation.

The WITCH control panel

The WITCH control panel

WITCH is the Wolverhampton Instrument for Teaching Computation from Harwell – It is essentially a programmable calculator – reading programs and numbers from 6 tape readers, feeding them through its relays, circuits and decatron tubes and producing results on a connected printer. The design was started in 1949 and it ran its first program in 1951. You can read the full story on the TNMoC website.

So I spent quite some time watching it, listening to it and trying to understand what I could of how it works. One day I’ll write a full-blown simulator for it, but not today…

The rest of TNMoC is still fascinating – as well as some of the older computers – IBM , Marconi, Ferranti, Digital (PDP) and so on, there is also a modern (well to me!) selection of microcomputers – starting with the Apple II, going through other variants – the BBC Micro, Spectrum and many others – right up to modern day organisers and the “smartphones” they’ve all more or less become now.

And something that should have been better/popular, but just didn’t make it…. Won’t tell you what, but the keyboard has an “Oops” key on it! (Ok, I will tell you, it was the PERQ!)

They also have some computers that are not that old (relatively speaking!), but completely unknown to me. Just keep looking and asking and you’ll find something you’ve never seen before, and at the end of the long corridor is the BBC Micro room – anyone who was a teenager in the 1980’s in a school in the UK will immediately recognise them and the bits and pieces connected to them.

Finally there is a little cafe and shop – they do nice hot chocolate and (I have to say) although it’s small and doesn’t do food other than biscuits/cakes, I’d go there any day over the canteen in BP!

However, while I thoroughly enjoyed my visit, it wasn’t without issue – the confusion between BP and TNMoC was one, but also I felt that TNMoC was lacking “something”. I suspect a proper sense of direction, but I know that it’s all staffed by volunteers who do a great job, but …

What I’d like to see is more “hands-on” stuff. I spent some time showing my wife how punched paper tape works – and just happened to use a handy TTY33 to help demonstrate it – however that TTY33 had a “do not touch” sign nearby, but hey, what’s a sign…. However that’s an issue. I feel we need more hands on things like that – there is a room with that lovely smell of warm machine oil, but just lots of what looks like junk lying about. What about a few TTY33’s with working tape punches and readers for kids (young and old!) to play with… Connect one up to a computer running BASIC for that proper authentic time-sharing experience… Get one to run “Eliza” and so on…. Hunt the Wumpus, there’s loads of old stuff like that that might be amusing to some…

So there you go – TNMoC – A great place. Visit it you can!

As for Bletchley Park… It’s fine too, but I’m not sure I’ll visit that part of the grounds again – and especially not the canteen )-: Very disappointing there… Take a packed lunch and get into the cafe at TNMoC for a hot chocolate!

Floods in Buckfastleigh

On the evening of Saturday the 24th of November, 2012 the lower part of Buckfastleigh flooded. Both the Mardle river and Dean burns were full to overflowing – with some rather serious consequences. I originally took a few dozen photos and dumped them here, but I’ve now had time to sort them and take a few photos of the morning after – when the river levels had returned to almost their normal winter levels.

Fortunately the rivers do drain rather well here, however a period of constant and heavy rain (lasting weeks) had essentially filled up Dartmoor which normally acts as a big sponge – and the water had no-where to do but to fill up the rivers.

In Buckfastleigh, Station road was the worst hit, but the shop at the bottom of Fore Street (“Curios”, known to some as “Trevors” DIY although he moved out some years back), the Valiant Soldier and a few houses on Fore Street which backed onto the Mardle were also affected.

Our garden backs onto the Dean Burn and the water was up to the top of the steps we have which lead down into the burn. That’s about 2 meters higher than normal.

If you want to see the original snaps I put up here, please go to: and do get in-touch if you need/want lager ones for insurance, etc. purposes.

This is what I first photographed:This is the view into the little gap in the Dean Burn at the bottom of Fore Street/Eliot Plain. The wall on the left is the bridge leading into Eliot Plain. Curios Shop is to the right. The top photo shows the Dean Burn up to, and over the bottom of the bridge. This is probably part of the cause of the Dean to backup up behind Curious and causing it to flood.

This is looking along Station Road. The water ended up a little higher before it started to receded, but the cars are under enough water to cause problems with their carpets, electricals, etc. and the houses to the left all had water running through them.

This is Station Road Car Park. Cars up to their axles at this end, it’s a little lower and so a little deeper at the other end. The bottom photo is the morning after – mud and lots of unhappy people.

A little hard to tell what that is, but it’s the steps at the bottom of my garden that lead down into the Dean Burn. Normally you can walk down them and stand by the side of the burn, but on that night the water was right up to the top and starting to creep down the path. That’s about a 2m rise.

This is the Dean Burn at the bottom of my garden. In the top photo, it’s almost coming over that wooden bridge (it was splashing over it at one point). Normally it’s just a little stream and we see the river bed, even in winter – unless it’s been raining. That bridge is a good 2m above the water level.

This is the bridge over the Mardle at the bottom of the lane off Fore Street that leads into Dial Court, or the old foundry. The Mardle didn’t drop as quickly as the Dean – there’s still another metre of water to go until it gets to normal levels there.

This is the other side (upstream) of that bridge. There were some local concerns about the stability of the walls on the building opposite – fortunately they held!

This is the bridge over the Mardle on Station Road. I’m standing on the wooden bridge that goes over the Dean Burn from the car park into the Millennium Green here. In summer we hold an annual “duck race” and walk under that bridge without bending over… This is where the Mardle and Dean joins. The water downstream of here was “big” and almost all the green was flooded.

Looking down the steps from Dart Bridge road into the millenium green…

The Mardle (+Dean) flooding into the millenium green (Looking from Dart Bridge Road)

These two shots are over the Dart Bridge Road and show the Mardle (+Dean) up to the level of the wall (and it was over the wall just a few meters downstream of here and flooding into a garden). The steps you can just see the top of in the bottom photo lead down to a grating which is the overflow tunnel for the Dean Burn – there’s at least 2-3 metres more water height here than normal.

The townspeople have been remarkably resilient and for most things are getting back to normal now – although it’s been sad to see peoples possessions out on the street in the past week, waterlogged and ruined. David Cameron PM visited the town on Tuesday too and we had some news coverage – good for the town, lets just hope all the insurance companies quotes and promises, etc. are kept!

RTB – Return to BASIC

At long last (well only 10 months or so!) I’ve released my BASIC to the world!

RTB is a modern BASIC in that you don’t need line numbers and it supports nice looping constructs like while/until with named functions and procedures that support local variables and recursion.

It currently runs on the Raspberry Pi and should run on any modern Linux system – as well as on a Mac and hopefully soon, MS Windows too.

If you’re interested, then find it here

More Buttons and LEDs

John Jay based in Georgia, USA is a retired engineer who’s “gotten the PI bug” and designed some new IO boards for the Raspberry Pi. He’s currently selling them via eBay and I have some here to play with!

(I love new toys!)

So-far he’s designed a simple buttons and LED board, a stepper motor driver (although it’s really a versatile 8-bit output port with a ULN2803 darlington driver) and the third is a 32-bit GPIO extender board

The one I’m looking at today is the the buttons and LEDs board – very similar to my Ladder board, but in some ways much simpler and more down-to earth.

His boards are very small and designed to sit on-top of the Raspberry Pi. Here is the button/LED board next to my Raspberry Ladder board and on top of a Raspberry Pi:

John Jays LED/Button board

John Jays LED/Button board

John Jays board on-top of a Pi
John Jays board on-top of a Pi

The board plugs into the Pi (please do it while your Pi is turned off!) and there is a rubber bumper underneath to stop it wobbling and potentially shorting anything out underneath (a problem I noticed in some other boards – thankfully most people have seen the light now and are supplying these little bumpers on their boards)

The board itself presents no issues when using. John has used the switches with the long buttons which make them easier to use than the low-profiles ones. The board has the standard BCM_GPIO numbers on it – so you need to do some conversions if you are using a Rev. 2 Pi as numbers 0,1 are now 2 & 3, and 21 is now 27.

The (very bright!) LEDs have 330Ω limiting resistors and the switches connect to ground via a 1K resistor, so like my ladder board, it’s important to set the internal pull-up resistors on the Pi to read them reliably. (and the 1K resistors will prevent any damage should the pins be accidentally configured as output)

I wrote this little test program to quickly check the boards functions:

 * jjLed.c:
 *      Test program for John Jays LED and Button board
 *      Gordon Henderson
 * The board is laid out as follows:
 * LEDs:      ( 8) ( 9) ( 7) (11)  (10) (13) (12) (14)
 * Switches:     [16]      [ 0]       [ 1]      [ 2]
 *               [ 3]      [ 4]       [ 5]      [ 6]
 * Numbers here are wiringPi pin numbers and will work on either
 * a Rev1 or Rev2 Raspberry Pi

#include <stdio.h>
#include <wiringPi.h>

static int leds [8]    = {  8,  9,  7, 11, 10, 13, 12, 14 } ;
static int buttons [8] = { 16,  0,  1,  2,  3,  4,  5,  6 } ;

int main ()
  int i ;

  if (wiringPiSetup () < 0)
    fprintf (stderr, "Unable to initialise wiringPi\n") ;
    return 1 ;

  for (i = 0 ; i < 8 ; ++i)
    pinMode (leds    [i], OUTPUT) ;
    pinMode (buttons [i], INPUT) ;
    digitalWrite    (leds    [i], LOW) ;
    pullUpDnControl (buttons [i], PUD_UP) ;

  for (;;)
    for (i = 0 ; i < 8 ; ++i)
      digitalWrite (leds [i], !digitalRead (buttons [i])) ;

I saved this into jjLed.c and compiled with:

gcc -Wall  -ojjLed jjLed.c -lwiringPi

and run with:

sudo ./jjLed

and it worked a treat – pushing the buttons resulted in the corresponding LED being lit up while it was pushed – the top 4 buttons control the left-most 4 LEDs and the bottom 4 buttons control the right-most 4 LEDs.

John has a website which is in the process of being put together right now, (see and is selling these on eBay and for $9.99 it’s not a bad deal at all and a good introduction to the Pi’s GPIO.

The Raspberry Ladder Board

The Raspberry Ladder is a small kit comprising PCB with LEDs, resistors and switches intended to be used to experiment with the Raspberry Pi’s GPIO functions and hopefully to get people interested in soldering up their own projects. Soldering is not difficult and it’s a good skill to learn if you are keen to learn more about electronics. (or repairing jewelry!)

The Raspberry Ladder Board

The Raspberry Ladder Board

The kit is quite easy to assemble and to help you put it together, I’ve made a video demonstrating a board being soldered and tested.

The Raspberry Ladder was featured in the November issue if the MagPi Magazine – please read the original article if you can – it has details of the assembly process as well as a picture or 2.

Click here for the assembly video via YouTube.

Please Buy the kit from Tandy in the UK

So what can we do with 10 LEDs and 4 switches? quite a lot, I hope. This blog entry is just a taster page for it all – software supplied which you can download includes a simple test program (to make sure it’s working OK!), a version of the ladder program which was the inspiration for this board, the Tuxx Crossing simulator, and some new programs – A version of the “Simon” game, and a reaction tester. These programs are written using Bash Scripting, C and BASIC – and I’ll welcome some contributions written in Python, Scratch, or anything else you may care to use!

For more details of the software to drive the board, please see this page.

Halloween Pi

If you’re a reader of the MagPi magazine then you may have seen my Halloween Pi project in the October issue…

If not, then have a quick wander over to their site: and have a look!

Octobers magazine featured a little Halloween project I did – sadly, due to a few factors beyond my control – some family illness necessitating a round trip of some 5000 miles to Tenerife and back, and the seasonal availability (or rather lack or it!) meaning I was little pushed for time and unable to get a real pumpkin before the publication date, I felt I didn’t give it all it was worth, so I’m  re-doing it here for my own archival use and to maybe add a few more things into it.

The idea was to put some flashing LEDs inside a pumpkin along with a PIR sensor  so that when triggered by movement, the LEDs would flash some colourful patterns.

Because I couldn’t get a real one on-time, my pumpkin was built in a plastic bucket… Not that bad really, but could have been better – it was in the shape of a Halloween pumpkin though!


The Halloween Pi

The Halloween Pi

Inside the "pumpkin"

Inside the “pumpkin”

The brainbox of it all

The brainbox of it all

Rather than solder, I used some heat-shrink to hold the wires of the LED to the female to male patch leads. The little board on-top of the Pi is the Dtronixs Minipiio board and it’s all sitting inside an Adafruit case.

The rest of the hardware if fairly straightforward – They are common cathode RGB LEDs and the PIR sensor.


The Dtronixs board isn’t available – yet, but I understand “real soon now”…

If you’re outside the UK/Europe, then I strongly suggest looking at the Adafruit site for these bits & pieces, and more, but most hobby electronics shops should have everything you need.

Note that the resistors are a little lower than I’d normally use – these RGB LEDs are quite bright and need a slightly higher drive requirement than the common red/green/yellow ones to be effective. (and even here, those are the typical values for a 5v supply – the LED will be slightly dimmer powered from the Pi’s 3.3v, but you really won’t notice it)

Wiring it up

No surprises here – GPIO’s 0, 1 and 2 (wiringPi numbering convention) to the Red, Green and Blue of the first LED, 3, 4 and 5 to the RGB of the 2nd LED, and pin 7 to the input from the PIR sensor. A Fritzing diagram is below:

Breadboard layout

The first LED is on the right in this diagram. (Not that it really matters!)


I wanted to use the software PWM library in wiringPi to light the LEDs up and make some interesting colours/patterns, so that meant the software needed to be written in C (at least initially)

If you don’t already have the  wiringPi library and gpio utility installed, then:

git clone git://
cd wiringPi

and that will get the code and install it for you.

Get the Halloween software by a similar method:

git clone git://
cd halloween

Before running the software, you can test the LEDs and sensor with the following commands:

for led in 0 1 2 3 4 5; do gpio mode $led out ; done
gpio mode 7 in
gpio write 0 1   # 1st Red LED ought to be on
gpio write 0 0 ; gpio write 1 1 # Red off, Green on
gpio write 1 0 ; gpio write 2 1 # Green off, Blue on

You can do the same for the 2nd LED using numbers 3, 4 and 5 respectively.

If you’ve wired the colours up wrongly, then it’s easy to change them and use the gpio command to check.

The PIR sensor works by firstly sampling the surrounding heat “signature” for a few seconds, then waiting for it to change. So to test it, you need to be very still… and keep on typing the following command: (Use the up-arrow key!)

gpio read 7

It should read 0 when not triggered and read 1 when it is triggered.

At this point, assuming all is OK, you can run the program:

sudo ./halloween

and see what happens. Remember that it needs 5 seconds of stillness to register, then you can move and see what happens.

If you want to change the patterns then you need to look at the ledPatterns.c file. You can use that as a template, or modify the code already there – whatever you do, have fun!


If you are carving a real pumpkin, then here is a suggestion or 2 – get a black marker pen and draw a zig-zag round the top, also decide where the back is and draw a short vertical line through the zig-zag – that way, you’ll know exactly where the top goes when you come to putting it back on again!

Scoop out the flesh, but don’t throw it away! You can use it to make some tasty roast pumpkin soup as follows:

Put the flesh into an ovenproof dish with a glug of olive oil and a sprinkling of salt and roast in a hot oven – 220C or Gas mark 7 for about half an hour or until it starts to take a little colour.

Remove from the oven and transfer into a pan. Add in half a vegetable stock cube (or a whole one if you carved a huge pumpkin!)  and a small tub of single cream. (again, maybe a a large pot if it’s a huge pumpkin!)

Mash or blitz with one of those hand-held mixer thing and return to the heat to thoroughly warm through – add a little milk or water if it’s a bit thick, and serve immediately with some fresh crusty bread.

For a little variation and more texture, add in a drained tin of sweetcorn and to make it a little warmer, try some smoked paprika sprinkled on-top when serving.

Some Halloween information

Halloween is an old festival or celebration, or ritual which has been adopted by many cultures and religions over the world. It’s roots may originate in acknowledging the autumn is ending and we should take stock for winter, or to remember the passing of souls, or a time to hide from ghouls or the souls of enemies (hence the masks and lanterns!)  For us, it’ll be a bit of fun, some hot soup and a fancy Raspberry Pi powered lantern!

In Scotland (Where I’m from), you should traditionally use a large yellow neep and make a “tumshie heed”. Some English counties may traditionally use a mangelwurzel and if you can get of suitable size that may be appropriate.

The modern trandition of “trick or treat” may originate from an early Christian practice of baking small round cakes for All Saints Day (November 1st)

PiFace – Mk2

Since I first wrote about the PiFace back in July there has been a new development! Dr. Andrew Robinson who’s the leader behind the project at Manchester university have had some valuable feedback from their initial prototype release and re-designed the board and it’s now a full production product complete with all the regulatory markings, using surface mount technology with many improvements too!

The biggest change (for me!) is jumpers to enable (or disable) the two on-board relays. Now you can have full control of all 8 outputs without having the relays click when you are using the outputs for purposes other than the relays.

There is a nice terminal block with the Pi’s 5 volt supply exposed on a screw terminal to use for your external projects too. Still the same 4 buttons which shadow 4 of the 8 inputs.

Another nicety is the addition of a rubber bumper which sits on-top of the Pi’s HDMI socket and prevents the board moving with the possibility of shorting anything out.

Finally, rather than the 4 little 3mm LEDs on the original one, there is now a bank of 8 surface mount LEDs on the 8 outputs! So you can see exactly which output is on or off.

Software wise, it’s the same as before – SPI interface to the Pi and my existing wiringPiFace test program worked out of the box without any changes.

The new PiFace board – note the 2 LEDs lit up – outputs 0 and 3 are on:

PiFace - Mk2

PiFace – Mk2

(Ok, So I can’t actually access the terminals in the Adafruit case, but it was easier for this quick test to leave the Pi in that case!)

So all in all, it’s a fantastic update to the original, and if you want more information on it, then go to their website here.

Minor update – 23rd October

Andrew informs me that it’s going to be a couple of weeks before they’re ready with the full documentation for the board, so hang in there, but keep checking their site for updates!

Experiments in PCB design for the Raspberry Pi

I recently thought it might be a good idea to make up a PCB of one of my Pi projects – the ladder game.

So famous last words: How hard can it be?

Fortunately, it’s not that hard now, and there is a plethora of software available to help you do the design and layout – I’d already started with the Fritzing package to produce the breadboard layouts, so I decided to stick with that. Fritzing also offer a PCB prototyping service too, which is on the expensive side, but they all are when you’re just wanting a small number of PCBs (want 1000? Sure, then the price can drop to under £2, but want one or 2 then expect to pay well over £50 for them!)

However, while using the Fritzing software (under Linux of-course), I decided to not use Fritzing for the PCB manufacture in the end – a few issues, one as that I won’t use PayPal, another was that my bank (NatWest) were just being obtuse and seemingly doing everything they could to block a money transfer to Germany (as well as charging me a stupid amount of money to do the actual transfer!) So in the end, wanting to do this quickly before I went on holiday, after a very quick search, I found PCB Panel who are based in Dorset – not the cheapest, but they base their manufacturing on making an entire panel of the same design – so I ended up with 3 PCBs from their smallest panel.

Fortunately there is a standard for conveying PCB layout data called Gerber Format and the Fritzing software can create a “Gerber” which is really a collection of various files which I could ZIP up and sent to PCB Panel for manufacture.

So cost aside, lets quietly ignore that for now… Turning a breadboard layout into a PCB design was rather interesting. For one, I found the routing of the wires to be somewhat challenging – until I remembered that I was making a double sided board and that it didn’t really matter which GPIO pins I actually used to drive the LEDs – I can fix that up in software later! So the final board has the 12 LEDs wired up in what may initially appear to be a random pattern, but in practice it works well.

And here it is:

Assembled ladder PCB

Assembled ladder PCB

You may notice a 2nd button on the board compared to the original on a breadboard – no real reason there other than “because I can”.

So what went wrong… You can probably tell from the photo that the silk-screen is somewhat incorrect. I actually did correct it, but in my rush to get things going before I went on a holiday, I emailed the wrong version to the PCB company.

The other thing is the holes for the edge connector – they’re too small. My fault for not checking the Raspberry Pi template I was using, however I’ve reported this back to the person and it turns out he had the same issues too, but it’s now been corrected.

The other issue that’s not apparent is that you need an extra-long 2×13 way edge connector to make it mate with a Raspberry Pi! Standard ones are too short – which is why the PiFace is the shape it is, as it sits underneath the Pi’s Ethernet, USB and composite video connectors.

Ladder PCB Connected to a Pi

Ladder PCB Connected to a Pi

See the image above for details of the connector – and note the need for an extra long one! (If anyone knows of a UK source, please let me know!)

So there you have it. Designed and had a PCB manufactured and it’s the first time in over 25 years I’ve done that and although there are lessons to be learned, I’m actually very happy with the results.

And so tomorrow I’ll design a PCB for the next Raspberry Pi 😉

WiringPi and the Raspberry Pi Revision 2

So the big news is that there is going to be (or already is!) a 2nd revision of the Raspberry Pi PCB, and even bigger is that it’s going to be manufactured (well, assembled) in the UK.

That’s great, but what else? Some of the GPIO pins have changed and that’s not so good for some…

In essence:

  • The I2C pins which used to be GPIO 0 and 1 are now GPIO 2 and 3.
  • The pin that was GPIO 21 on the edge connector is now GPIO 27.
  • There are 4 more GPIO pins available – if you solder on a new connector!

If you are using wiringPi’s native pin numbers then you don’t have to worry. Just get the latest version off the GIT site, install it and re-link your programs.

If you are using the native GPIO pin numbers, then you will need to change your programs – swap GPIOs 0 and 1 for 2 and 3, and 21 for 27.

The 4 new GPIO pins have numbers in the wiringPi scheme of 17, 18, 19 and 20. They are BCM_GPIO pin numbers 28, 29, 30 and 31.

And that’s more or less that!