Nov 162015
How to drive a 7 segment display directly on Raspberry Pi in Python

Last week I bought some 4-digit, 7-segment displays to experiment with. Strangely enough it was something I’d never tried before, so I was interested to see how they work. I googled around looking to see if someone else had done this before. It seems there are several different sorts of 7-segment displays, so you have to find a good match for the one you’ve bought. You can get them in various guises including: i2c backpack; 12 pins; 16 pins; resistors built-in; common anode; common cathode etc. The ones I bought are 12 pin, bare, no […more…]

Oct 222015
RasPiO GPIO Ruler goes on general sale

You may remember I ran a KickStarter campaign in August for the RasPiO® GPIO Ruler. The KickStarter rewards were all sent out in the first week of October. (We finished shipping 3 weeks early.) So now it’s time to launch the product officially and make it available to all on general sale. If you missed out on the KickStarter, now you can buy one. In case you haven’t seen it before, this is what it looks like… What Is The RasPiO® GPIO Ruler? It’s a coding crib-sheet for RPi.GPIO, a port ID guide, a multi-scale […more…]

Oct 152015
GPIO Zero Test Drive - Making Light of Security

Giving GPIO Zero (Beta version) a test drive might make you feel a little insecure, but I’m aiming to throw some light on the situation. I decided to try out some of the built-in features of GPIO Zero by working up a little hardware project. I looked at the current feature set and decided to try and combine MotionSensor, LED and LightSensor all at once. What sort of project uses that kind of technology? Why a PIR-controlled security light of course – if you swap the LED for a relay and 12V lamp! The video […more…]

Oct 122015
GPIO Zero - Introduction

If you’re a RasPi.TV regular, you’ll know that one of my very favourite things is hacking around with the GPIO ports on the Raspberry Pi and sharing my findings with the world. Sometimes this involves documenting a new feature, sometimes it involves making a new project, using a new chip or just getting something working that I haven’t tried before. But it nearly always involves Python programming and the brilliant RPi.GPIO Python library by Ben Croston. I’ve written all sorts of tutorials (~16) on RPi.GPIO because it is one of my favourite things. You may […more…]

Aug 122015
RPi. GPIO GPIO.getmode() function

Another new RPi.GPIO feature that I discovered last week is GPIO.getmode(). This appeared in RPi.GPIO 0.5.11 and allows you to query RPi.GPIO to see whether GPIO.setmode() has been set up as BCM, BOARD, or UNSET mode. This could be useful if you are running a suite of scripts or modules which work together. GPIO.getmode() returns… -1 if GPIO.setmode() is not set 11 if GPIO.setmode(GPIO.BCM) is active 10 if GPIO.setmode(GPIO.BOARD) is active Below you can see a live python session showing what you get when you use GPIO.getmode() with different modes set… Why Did You Bother […more…]

Aug 102015

In RPi.GPIO 0.5.10 (we’re now on 0.5.11) Ben Croston ‘deprecated’ GPIO.RPI_REVISION, which used to be the preferred way to find out what kind of Raspberry Pi board a program was running on. This was a useful feature to make it possible to write software that will work on any Pi, regardless of how its GPIO pins are arranged. To date, we’ve had three different GPIO pin header layouts for the standard Raspberry Pis (four if you count the compute module). But GPIO.RPI_REVISION has been deprecated (fallen out of favour) because there is now something better. […more…]

Jun 152015
Flappy Brain EEG controlled game by Albert Hickey @winkleink

At Last week-end’s Cambridge Jam I met Albert Hickey @winkleink, who showed me this extremely cool brain-wave controlled version of Flappy Bird. This is a video post, so I’ll let the video do the talking… Albert runs the Egham Raspberry Jam and his blog can be found here. He’s written the project up and shared the code there. @RasPiTV Thank you for doing this. Will have all set up to play at @EghamJam on the 12th of July. — Winkleink (@winkleink) June 15, 2015

May 182015
Twitter-controlled RasPiO Duino based Pan and Tilt, Tweeting, DropBoxing, Raspberry Pi Security Camera

Around about this time three years ago, I bought and installed five EasyN pan-and-tilt ip cameras to keep an eye on various viewpoints of our houses in the UK and Poland. I think they were about £45 each on Amazon. They’re not too hard to set up and they work tolerably well. The main downside is that their resolution is only 640 x 480 pixels, which is not enough to read a car numberplate from across the street. It’s fairly poor resolution, but you can see something. The colours are a bit washed out too […more…]

Mar 292015
RasPiO Duino as a Lipo Monitor

I’ve been using lithium polymer (lipo) batteries since 2006, when I nervously shelled out £30 for a 3 cell 1600 mAh 10C HiModel lipo to power my EasyStar RC plane. I also spent about the same on a charger and balancer for it. Thankfully, all these things have come down a lot in price since then. I don’t think I’d expect to pay much more than £10 for an equivalent battery now. Typical lipo batteries for large devices have multiple cells. A lipo cell has a no-load resting voltage of 4.2 V when fully charged […more…]

Feb 192015
Interactive Graphing for the Web on Raspberry Pi using

I’d never done graphing on the Pi or in Python before, but for my KickStarter tracker I wanted something that… was web based would work in Python had decent instructions I could get going with fairly quickly I’d seen Rachel Rayns tweet about using for graphing the temperature output of her Chef’s HAT sous vide cooker. I know Rachel loves “human readable instructions”, as do I. So I thought there was a good chance the plotly documentation was good. I decided to give them a shot. Sign Up For An Account The first thing […more…]