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…]

Mar 282013
 
Guzunty Pi - Open Source CPLD board for the Raspberry Pi

The Guzunty Pi board is an open source Complex Programmable Logic Device (CPLD) add-on for the Raspberry Pi. Derek Campbell is behind this project, and has clearly spent a lot of time and effort putting it all together. He describes it… “a CPLD is like several large breadboards laid out on your desk, full of every combination of logic devices you are ever going to need. It is waiting to be told what to do. It doesn’t need a host of jumper wires like a breadboard would. It can be reprogrammed again and again (even […more…]

Mar 222013
 
How to use interrupts with Python on the Raspberry Pi and RPi.GPIO - part 3

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…]

Mar 202013
 
How to use interrupts with Python on the Raspberry Pi and RPi.GPIO - part 2

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…]

Mar 172013
 
How to use interrupts with Python on the Raspberry Pi and RPi.GPIO

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…]

Mar 112013
 
How to make your own Raspberry Pi flag-waving demo

After the recent call for items for the demo table over at Raspberry Pi HQ, I thought I’d send over a flag-waving set. It’s not a product for sale, but it’s one of the most eye-catching and memorable Raspberry Pi demos I’ve made. People mention it more than any of the others when I don’t take it along to Jams. There’s a video, at the end of the page, showing three Pis all waving flags together (based on three different drive systems). Making the flag So I set about making a flag. It’s pretty easy. […more…]