The team at the Raspberry Pi Foundation have been hard at work giving their learning resources a revamp. A new template has been designed and all the artwork is in the process of being converted to a much more child-friendly style (see above). The design is the brainchild of Sam, their in-house designer who is all-round nice chap.
They’ve also been expanding their selection of printed resources ahead of the Bett conference that’s happening in London this week:
… where they’re all sporting fancy lab coats to stand out on the Raspberry Pi stand:
Devon, at EsoLogic, has created a Raspberry Pi app which detects tweets to a specific account and then changes the colour of the light in a Massachusetts dorm room, thus making the window change a different colour. The account then tweets you back a picture to confirm it’s done it.I thought perhaps it wasn’t working, but sure enough I just got a tweet back! You can see it in action below and read a bit more and try it out here.
The folks at Joypad Bar (@joypadbar, joypadbar.co.uk) in London wanted to set-up a voting booth that allowed people to vote on which retro game would be played next. They got a Raspberry Pi and some huuuuuuge buttons and wrote some Python that would detect votes and keep a tally. You can see the results of their work and how they did it here.
Richard Hayler wanted a way to produce Minecraft-themed birthday cards for his sons friends. So, he decided to use Minecraft Pi Edition to it! He wrote a script which takes in the name you want to generate and then pipes it into Minecraft, generating the name in 3D (see above). He then used Raspi2png to take the screenshot. He then wrote a GoogleAppEngine front-end to the whole process so that you use a web-page to enter the name and pick the block you want to use. It’s a great piece of programming with a practical use! You can read how he did it here, and download the script, or try it out yourself here (be patient!).
Rob Boyle sent me a Pi & Bash to have a play with, so I thought I’d write up my experience into a sort-of review.
Introduction
The Pi & Bash is an add-on board for the Raspberry Pi. It comes as a kit, which needs to be soldered together, and then plugs into the GPIO pins of the Pi. It is compatible with all models of the Pi as it uses a 26-pin header. Here are the key features of the board:
Onboard LCD screen with a potentiometer to change the contrast of the display.
Analog-to-digital converter onboard allowing you to interface with up to 8 analog sensors.
Port expander – giving you 8 digital inputs which makes up for the standard Pi pins being used for the LCD.
A temperature sensor is included so you can start reading analog signals straight away.
I2C pins are broken out to a header – very useful when considering that a lot of the digital sensors you can get, e.g. barometers, use the I2C protocol.
5 buttons for navigation or other purposes.
Traffic light LEDs.
It all comes in an attractive retail package (below – apologies for the tiny picture) much like electronics kits you can buy from Maplin.
Assembly
Thanks to some excellent assembly instructions, the Pi & Bash is fairly easy to put together for the novice solderer. I wouldn’t necessarily give it to a beginner, just because of the sheer number of components on the board, which could be a bit daunting. It took me about 40-45 minutes, and my soldering is of an intermediate level, so you should be able to work out how long it will take you from that. The only downside with assembly is that the potentiometer for the LCD contrast setting is in a bit of an unfortunate position – you could connect voltage to your ground pin if you’re not careful with your screwdriver. I understand from Rob that he is thinking about changing the position or orientation of this component in the next revision.
I did wonder, looking at the pictures, whether the P&B might overbalance the Pi, as it sticks out quite a way, but it doesn’t. It does look a little unwieldy sitting on top of the Pi, but that’s a fairly minor issue that I don’t think could be solved easily – with this much functionality on board it’s not a major thing.
Set-up
Getting your Pi set-up to use the board is not a short process, but thanks again to some good instructions, it’s fairly straightforward. There are some modules to turn on and there is some software to install, but Rob’s guide goes through it steadily and clearly. As long as you don’t try to short-cut the procedures, and you do exactly as it says, you’ll have it up and running in fairly short order, maybe 15 minutes.
Rob has created a demonstration script for the board which displays various things to the LCD screen and then reads the temperature sensor, displaying the results. Ideally, the demo script could do with converting the temperature reading from a 0-1023 range to the actual temperature, but that’s fairly easy to do with a bit of mathematics. The script also shows you how to read the button presses.
Experiment
I wanted to see how easy it was to connect up an analog sensor. These sensors are typically very cheap, especially from China, and tend to run off a 5V power supply. Fortunately, Rob has been very sensible and, in addition to the 8 analogue pins, he has also provided both 5V and Ground rails. That’s the cluster of 3 headers at the top right of the picture at the top of this blog post. That means it’s really easy and convenient to plug sensors in. From my work with the Picorder, I have loads of analog sensors. I extracted the moisture sensor from the Picorder and plugged it into the analog input header, a 5V and a Ground. Here it is (it really is as simple as plugging it in):
Here’s a video of it in action:
I took the demo script that Rob wrote and adapted it. It was fairly easy, although the code could do with a lot more comments to help the beginner. The software is probably the biggest criticism I have of the whole product, to be honest. If it could be split out into modules so that the main loop was on its own, it would make the process of delving into the code much easier.
I played around with the various parts of the demo script, including reading button presses to do rudimentary ‘menu’ navigation. I can imagine this working very well if you needed to step through sensor readings, for example.
What else can you do with it?
Obviously, reading analog sensors is just the tip of the iceberg for the Pi & Bash. On the card that holds the product bag together, Rob gives some example projects you might do with it:
Traffic light simulator
Electronic dice
Security alarm
Internet radio
News/RSS ticker
Thermostat
Weather station
Network monitor
Model railway points controller
It’s a very versatile device. I might use my own board as a Kickstarter projects tracker. Or I might use it as the basis for a new Picorder project. There is so much functionality on the board that it’s almost bewildering the amount of stuff you can do with it. I can imagine it doing very well as the core of an environment-sensing project, especially in an educational setting.
Conclusion
The Pi & Bash is an excellent add-on board. It brings together all these great pieces of functionality into one neat package. The combination of analog and digital input, as well as the buttons and, especially, the built-in LCD, is a great idea. If I have any criticisms, they are fairly minor:
An I2C backpack for the LCD screen would have used fewer pins and left more of the Pi’s inbuilt digital pins available for use. (This would have increased the height of the board, though, as backpacks take up quite a bit of room).
The potentiometer is in a bad place for adjustments. (But future revisions may fix that issue).
The software side is a legitimate issue. With a lot more comments and simplification the code would be a very useful learning tool. As it is currently, it takes a lot of effort and concentration to understand what the code is doing. This is rectifiable, though, with some time spent on it. I might even have a go myself just to make it more suitable for my use.
Although the Pi & Bash isn’t a perfect add-on board, it does pack in an awful lot of functionality for the money. It costs about £23 (you can get it from ModMyPi or you can get it from RyanTeck here), depending on where you get it, which may seem expensive, but I think is about right.
If you want to get into analog inputs and have a way to display the results without wiring it all up yourself, there isn’t a better product out there on the market. A little work on the software will raise its game further, and I can see it being used at home and in schools.
Perhaps the best compliment I can give it is that I will use it again. Some of the stuff I have in my collection I will never touch again, but the Pi & Bash just has so many possibilities that I can see myself using it for a major project in the near future.