wiringPi updated for the new Pi v2

The Pi 2 has the same GPIO interface, however presumably due to the 1GB of RAM the GPIO base location has changed.

Fetch the latest wiring Pi – version 2.24 – and you should be fine on all versions of the Raspberry Pi.

Start here: http://wiringpi.com/download-and-install/

Other updates include a new SPI initialiser (lets you choose SPI mode), and some general tidying up. Look for a new way to dynamically add peripherals into a running C/C++ program too – documentation for this will follow, but if you’re keen, then look at the gpio command and how it handles the -x flag.

Update to this on the 3rd Feb:

The Pi v2 I was sent had an SD card with older firmware in it – the result was that the Hardware and Revision fields in /proc/cpuinfo were incorrect – and as these were what I used to detect the Pi type and version, then it worked for me, but not for everyone else )-:

I’ve implemented a quick fix for now, but the foundation has actually encoded a lot more information into the Revision field – which I have the details for, but not yet coded up. Watch this space, as they say…

Comments are closed.