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.
Buying the Pi & Bash
You can get the Pi & Bash from…