A few weeks ago I blogged about RPi.GPIO updates for the model B and updated my RPi.GPIO documentation and quick reference sheets. But there was one feature I held back on because I needed a bit more time to mess about with it. (And then got busy with other things.) So What Was It? gpio_function() Another RPi.GPIO feature that sneaked in while I wasn’t looking is gpio_function() This is a feature that’s been inserted in RPi.GPIO to enable you to query the setup status of a port to see how it’s configured. import RPi.GPIO as […more…]
Having brought my RPi.GPIO documentation (almost) up-to-date with the previous blog post, I realised it was time to update my RPi.GPIO Quick Reference ‘cheat sheet’ as well. It’s quite a useful reference. Page 1 gives you the basic RPi.GPIO commands and usage. I like to take one of these the Jams in case someone needs help and I can’t remember the necessary commands. Page 2 has a Raspberry Pi GPIO pinout diagram for all versions (except compute module). This part has been updated to add the pinouts for the B+ (and A+). Page 3 gives […more…]
A few days ago, Ben Croston updated the RPi.GPIO Python library so that the ‘board’ pin numbering system would work with all of the pins on the B+. It doesn’t really affect the way I work, as I always use BCM port numbers. They already worked on the B+ and the compute module. While he was at it, he made a couple of bug-fix tweaks. Looking at what was tweaked, I realised there are a couple of features of RPi.GPIO that I hadn’t yet documented. In this blog post I hope to update my RPi.GPIO […more…]
I wanted to check out the GPIO ports on the Raspberry Pi B+. The new B+ has 26 ports available for GPIO work. The previous model B had 17 on the main (P1) header and four more on the now deleted P5 header. The top 26 pins are all the same, but the 14 new pins contain 9 GPIO ports. There’s a full explanation of the ports in the diagram here… How to Test All 26 ports? Why with LEDs of course. You can do it by connecting an LED and resistor (~330 Ohms is […more…]
Back in December, you might remember I blogged about using Texy’s 2.8″ touchscreen with the Pi camera. At the time I was also aware of the very similar, but slightly more compact, PiTFT by Adafruit. The space for four slim buttons on the PCB made it look ideal. So, this week, when SK Pang tweeted about having PiTFT back in stock, I snapped one up. I also thought I’d put it in a nice case. The Pimoroni PiTFT Pibow looked ideal, so I ordered one of those as well. Both arrived 2 days later. It […more…]
Today we’re going to take a photo, overlay some text and graphics on it and then tweet it. In this series, we’ve been building a Raspberry Pi Twitter app and we’re adding more to it. This is a great way to develop software. Add things one step at a time and don’t move on to the next part until it works well, and you understand it. Why Would You Want To Do This? Let me backtrack and explain why I wanted to do this in the first place. I have a weather station running on […more…]
There was a Raspberry Jam in Cambridge on Saturday. I went along to help Carrie-Anne Philbin at the Sonic Pi workshop. I also took the two HDMIPi prototypes to display. Because I’ve been doing a series on making a Twitter App on the Pi, I decided that it’d be fun to use it to tweet some photos live from the event. So, armed with a pre-tested script and the wifi login details, I set it up. And I have to say it worked quite well in the quieter moments when there weren’t millions of people […more…]
Today it gets a bit more exciting. We’re going to take a photo with the Raspberry Pi camera and tweet it. Previously in the series we’ve covered how to: read twitter follower data in from your twitter account and pick one at random; make a simple text tweet at the command line, with a default tweet; tweet system information, like date and temperature. These are basic building blocks for manipulating a twitter account from your Raspberry Pi. So what do we need to know about tweeting photos? File Size Limits The maximum photo file size […more…]
Today I’m going to show you how to tweet some system information from your Raspberry Pi. In part 2, we did a basic tweet entered at the command line, with a standard, fixed, default message if no tweet text was entered. But That Default Text was Pretty Boring So let’s do something more fun with it. Let’s make it tweet the time, date and processor temperature if you don’t enter any tweet text. I got the ‘tweet the cpu temperature’ idea from Chris Mobberly’s blog. Here’s a condensed code snippet we’re going to borrow from […more…]
In late October I started a series on Twitter and Python tweepy. Then it got pushed to one side by HDMIPi. But now I’ve managed to find some “recreational” time to play with tweepy a bit more. So in this post, which is part 2, I’m going to show you how to post a tweet using a Python program on the Raspberry Pi. Create Your Twitter App Create a twitter app on your twitter account, as we did in part 1 here Give Your App Permission to Write Then make your app read/write. You won’t […more…]