Jul 142013
 
RPi.GPIO basics 4 - Setting up RPi.GPIO, numbering systems and inputs

Well, today is the day we actually get to use RPi.GPIO a little bit. But, before we get to that, you should know about the two different numbering systems you can use with RPi.GPIO. If you take a look at the main GPIO header (P1) of the Raspberry Pi, you’ll see that there are 26 pins. The top left pin (as we look at this photo) is called pin 1, the one to the right of it is pin 2. So the next row is 3, 4 etc. and on down to 25, 26. This […more…]

Jul 132013
 
RPi.GPIO basics 3 - How to Exit GPIO programs cleanly, avoid warnings and protect your Pi

You might think I’m going about this series in a funny way. You’d be right! I am. That’s because I’m trying to highlight the bits that people don’t read about in other tutorials/documentation/manuals/books. These bits are useful, important and often overlooked. If I covered inputs and outputs first, you might not get to the rest because you’d already “know all I need”. That’s only partially true though. Although you can get away with not knowing or using this stuff, it’s much better and safer if you know it and use it. So today we’re focussing […more…]

Jul 122013
 
RPi.GPIO basics 2 – how to check what Pi board Revision you have

It all started in September 2012. The Raspberry Pi Foundation went and made some improvements to the Pi. How dare they!! ;) Seriously, though, there were some significant improvements to the Pi and a Rev 2 version was launched with double the RAM and some other changes/additions/improvements. This threw up some minor headaches for developers because some of the GPIO pinouts were changed and some new GPIO ports were made available on a brand new “solder it yourself if you want it” header called P5 (see the leaning header of Pi5a) GPIO 0 became GPIO […more…]

Jul 112013
 
RPi.GPIO basics 1 - how to check what RPi.GPIO version you have

It struck me the other day that I’ve published some fairly advanced RPi.GPIO tutorials, (e.g. interrupts and PWM) but not done anything more basic, apart from the Gertboard examples. So here’s an attempt to remedy that situation. Over the next few days, we’re going to have a walk around Ben Croston’s RPi.GPIO, which is now at version 0.5.3a. Some of this stuff may be new to you even if you’ve been using RPi.GPIO’s more advanced features, so it’s worth having a look. What is RPi.GPIO? It’s an easy way of controlling the Pi’s General Purpose […more…]

Apr 282013
 
Cyntech GPIO Breakout Paddle Board Review

The Cyntech GPIO paddle board is a new type of breakout board for the Raspberry Pi. It’s nice and small (about half the size of the Pi) elegantly simple, and I like the connectors. To connect a wire, you hold down the orange tab, push your wire into the hole and release the tab. The wire is gripped by a spring-loaded contact. It comes with a very nice “rainbow” ribbon cable, which is much more cheerful to look at than a grey one and it’s a decent 20cm length as well. You don’t always want […more…]

Apr 212013
 
How to use soft PWM in RPi.GPIO 0.5.2a pt 2 - led dimming and motor speed control

In part 1 of this series, we looked at the basic commands for using software pulse-width modulation (PWM) in RPi.GPIO 0.5.2a and higher. In this article we’ll get a bit more hands-on and into some practical applications for it. It’s all very well being able to make nice square-wave pulses on an oscilloscope, but what’s it actually useful for? Our servo said? EEEEH AAAAH I tried using RPi.GPIO soft PWM with servos in response to a query after the last article, but, although it did change the servo positions, it was jittery. Servos require quite […more…]

Apr 142013
 
Raspberry Pi in the classroom (Y5) - sensors and switching

Back in November I made a Raspberry Pi controlled “light and fan relay switching” demo that you may have seen before on the Official Raspberry Pi blog. Before it appeared on the Raspberry Pi web site, I’d previously displayed it at Milton Keynes and Oxford Raspberry Jams and I’d also taken it along to let my year 5 ICT class have a go with it. Did they like it? You can see for yourselves in the video what the year 5s thought of it. I didn’t tell them what was going to happen, as I […more…]

Apr 122013
 
DesignSpark and RasPi.TV flying the flag in China

Mike Brojak from DesignSpark, whose voice you can hear in the video, asked me to put together a Wii controller flag-waving demo (plus other bits) on their new PiGo board. You may remember catching a glimpse of it in the flag waving video I produced a few weeks ago? This demo was destined for the Electronica exhibition in Shanghai, and I’ve just received a link to a little video the guys shot while they were there. (Thanks Yan :) ) Apparently it was well received, worked really well and only needed rebooting once in three […more…]

Apr 102013
 
Tandy Multiface Gertboard Compatible Interface Board for Raspberry Pi

The Tandy Multiface is a brand new I/O interface board for the Raspberry Pi designed by Darren Grant from Tandy. The reason it came about is that, back in September 2012, Tandy was marketing a Gertboard kit, having bought a supply of official Gertboard PCBs from Farnell. This was a bit of a coup because Tandy beat Farnell to the punch with their own product. Farnell struggled to get their ducks in a row (I seem to remember comments about a shortage of one of the chips) and launched their kit about a month later. […more…]

Apr 072013
 
RPi.GPIO 0.5.2a now has software PWM - How to use it

Over the last couple of weeks the pace of development for Python programmers who like to dabble in GPIO has gone up a gear. Both main GPIO systems for Python on the Raspberry Pi have been getting some enhancements. RPi.GPIO, now at version 0.5.2a, has interrupts and threaded callback capability. You will probably have seen my three recent posts showing how to use those. WiringPi for Python version 2 is in Beta testing. I discovered two bugs while I was trying it out. Both of those have been squashed. One by Gordon “Drogon” Henderson in […more…]