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…]
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…]
Multiple threaded callback interrupts in Python We’ve been learning about interrupts this week because of the brand new interrupt capabilities of RPi.GPIO. We covered a simple “wait for” interrupt in part 1, threaded callback interrupt and button debouncing in part 2 and today we’re getting sophisticated with multiple threaded callbacks. “WoooooooooOOOOOOOOOOOOOOOooooooooooo”, I hear you say. ;) Well actually, we’re not doing much that’s very different from last time, except, now there’s more of it. We’ll add another button and another threaded callback function the same as the first one (but on a different GPIO port). […more…]
Interrupts are an efficient way for a program to be able to respond immediately to a specific event. In the previous article I explained the basics of using interrupts in RPi.GPIO and gave an example of a simple “wait for an event” interrupt program. In this second article I will introduce “threaded callback” which opens up a lot of new possibilities. Threaded callback – what the heck is that? I know it sounds complicated. And it probably is complicated in the C code it’s written in, but we’re Pythonites and we don’t have to go […more…]
The latest big news in the world of Raspberry Pi Python GPIO programming is that Ben Croston has released an update for RPi.GPIO. Why is that a big deal? Because this version has interrupts. “What’s an interrupt?” I hear you say. It’s a way of waiting for something to happen without checking constantly whether or not it’s happening. Imagine that you’re waiting for a delivery – something you’re really excited about – like a Pi camera.You spend far too much time looking down the street in eager anticipation of the postman’s arrival. You can’t fully […more…]
Last night I went along to the Oxford Geek Night #30 to see Eben Upton talking about the Raspberry Pi. It was a good evening, but it was absolutely wall-to-wall people. Fortunately, it was obvious that it was going to be busy, so I got there very early and got a seat at a table near the stage. But you can be too clever sometimes can’t you? The fact that there were so many people ‘standing in the gap’ meant that I couldn’t see the stage. :( I enjoyed Eben’s talk though. The sound system […more…]
Lithium polymer batteries are light and powerful, but they can’t be run completely flat or they are ruined. I’ve been using them for several years to fly model planes, so I have plenty of them around. I’ve also been using them at Raspberry Jam meetings to power some of my Pi demos. I thought it would be fun to make a circuit so the Pi could monitor its own battery voltage. I used an analog to digital converter (mcp3002) and had the Pi check the battery voltage every minute and shut down when the battery […more…]
On Wednesday of this week, I went to film Dave Akerman and Anthony Stirk launching two high altitude weather balloons. One of them had a Raspberry Pi inside a TARDIS as its payload. It was cold. In the video you’ll see it looks almost as if Dave is smoking at one point. That would have been a bad idea as the 70 kg red cylinders are full of highly explosive Hydrogen gas. Slight cheating on the Vid I confess in advance that I did have to cheat slightly with the video. Dave was really keen […more…]
A few days ago I was playing about with my Raspberry Pi Model A. I wanted to measure the power consumption, since I started a thread on the Pi forums that talks all about this. This threw up an interesting problem because I wanted to measure the power consumption of the Pi both with and without my wifi dongle. But if I pull out the dongle, I’m not sure it will reconnect when I re-attach it, and then I won’t be able to communicate with it (I was using it headless – no monitor/keyboard). Eventually […more…]
There’s still some free tickets left for the Milton Keynes Raspberry Jam this coming Sunday 24 Feb 2013. Click here to reserve a ticket http://www.eventbrite.com/event/5421371468 What’s so special about the MK Jam? The Milton Keynes Jam is rather special because it is held at the National Museum of Computing, which is on the same site as Bletchley Park. They’ve got the oldest working digital computer in the world – the WITCH. Also there is Colossus – the famous code-breaking computer from World War 2. If you like computers, it’s an awesome place. (And if you […more…]