Review: Pimoroni/Cyntech Pibrella

There is no shortage of clip-on boards designed for the Raspberry Pi, almost all designed to make the tiny computer’s GPIO pins more accessible in order to ease the connection of devices to it, particularly ones that operate at voltages that are not Pi friendly.

For instance, I have a PiFace Digital which provides screw-lock wire attachments, switches, LED indicators and relays. It’s downside, perhaps, is that it doesn’t provide the Pi’s GPIO with better connectivity so much as use the GPIO to deliver its own different set of inputs and outputs. So projects for raw Pis need a little extra thought before they’re implemented on a PiFace.


Electronics kit: Pimoroni/Cyntech Pibtrella

Yet this ‘embrace and extend’ approach is the one Pimoroni and Cyntech have taken with the Pibrella, one of the latest Raspberry Pi add-on boards. If the PiFace Digital is the BBC Micro Model B of the Pi add-on world – big, expensive, feature-packed but possible function overkill for most users – then the Pibrella is the Sinclair ZX81: cute, cheap, cheerful but rather more rudimentary.

What we have is a small, purple board with a buzzer, three LEDs bulbs – a traffic light set comprising one each of red, green and yellow – a button and eight IO ports with female connectors. Four of the ports are inputs, the rest outputs; all are connected to on-board surface-mound LEDs.

Compare that to the eight LEDs, two relays, four switches, eight digital inputs, eight open-collector outputs and seven jumper blocks of the PiFace Digital. The PiFace looks like a serious bit of electronics; the Pibrella looks like a toy.


Pibrella provides four inputs, four outputs, three LED bulbs, a switch and a ‘buzzer’

But it’s not entirely unsophisticated. For example, Pibrella has an I²C bus header, though it’s currently pin-less and not readily usable. The board also has a micro USB port for driving connected devices that need more power than the Pi can provide but which, handily, will also drive the Pi the board is connected to, through the GPIO.

All of the Pibrella’s useable components are made accessible through a new Python library – just as PiFace’s are, incidentally – which neatly abstracts away all the Raspberry Pi GPIO stuff which you might otherwise need. This makes it very easy to target specific parts of the Pibrella, clearly and unambiguously.

The IO pins are all clearly labelled A through H, and this is how you address them in code, with no need to worry about pin numbering – pin location or chip GPIO assignments, all of which are different on the Pi itself – or which version of the Pi you have.


The Pibrella’s micro-USB port can power the Pi – or drive high-power connected devices

The buzzer comes with a couple of pre-defined tones, set in the library, though they didn’t sound very different from each other – or appealing – to me. It reminds me of the crude noise make that came with the electronics kit I got for Christmas 1981. A true tone generator it ain’t.

Just as the Pibrella library incorporates pre-defined noises, it also includes some set light patterns, including fades and blinks, which can be applied to each of the LEDs, so there’s some ‘my first project’ fun to be had here.

The four inputs and four outputs all feature both positive and negative terminals, effectively giving each one its own GND terminal. Like PiFace’s outputs, Pibrella’s outputs have activity LEDs to tell you when something is happening, but so do the inputs.


Attention to detail: the Pibrella has a pad to sit the add-on on the Pi’s capacitor

Watching out for, and responding to, occurrences has a deeper meaning with the Pibrella. What particularly appealed to me, as a programmer, is that the Pibrella introduces users to event-based programming techniques: the notion that code simply responds to external actions. This is, of course, how apps for modern operating systems are programmed: they do little or nothing until the user interacts with the UI, or data comes in from the network, say. But it’s not a common approach with embedded devices, such as Arduino.

The Pibrella introduces this, in a small, ‘ease you out of the shallows’ way, through a number of its library functions. These take the name of a function which will be called when a certain event takes place – if it ever does.

So rather than poll a pin to see if the Pibrella’s red button has been pressed, there’s a function, pibrella.button.pressed(), that waits until the button is pressed and, if it is, calls another function – a ‘callback’, in the jargon – you’ve defined and passed to pressed().


Serious and not-so-serious: PiFace Digital (left) and Pibrella

Likewise, the changed() function, available to any of the board’s eight IO pins, once registered with a callback function, will wait for the nominated pin to change its state and then call the named function.

To be fair, a lot of the event monitoring functionality comes from the regulation RPi.GPIO module for which the Pibrella library is a much more newbie-friendly wrapper. But top marks to Pimoroni for putting event-driven programming on the agenda in such a non-scary way. Understanding how this technique works is a big step toward being able to program desktop and mobile operating systems effectively.


The £10 Pibrella is a nice little Pi add-on for young kids and it’s a fine basis for programming lessons where a teacher wants children to write code that makes things happen in the real world rather than on screen.

Older novices may find it appealing too, for the same reasons, but I suspect that once they’ve worked their way through the sample programs – which won’t take long – they’ll put the Pibrella aside and start working on more complicated projects with resistors, wires, motors and stuff.


That’s not to say such projects can’t be connected to a Pibrella, but that new Pi users growing in confidence are going to want to interact with their machines more directly and, not to put too fine a point on it, want to work with kit that looks a little less like the result of a kid’s electronics kit toy.

The Pibrella isn’t a toy – at least not entirely – but in hardware terms it’s a step to more interesting things not a destination in its own right. Just make sure you take advantage of its entry into the world of event-driven programming on the way.

Pibrella is available now from Pimoroni and Cyntech

Review: Pi-Supply Pi-Crust

I came across Pi-Supply’s Pi-Crust add-on board quite by chance, but it immediately caught my eye as quite possibly the most useful add-on for the Raspberry Pi there is. Having ordered one, received it and soldered all the parts together, I’m no longer sure that it is.

The notion behind the device is very sound indeed. It’s an internal breakout board that doesn’t merely replicate the Pi’s GPIO ports, it re-organises and labels them logically and clearly. It’s also intended to fit snuggly within the form-factor of the Pi itself. This is, frankly, a brilliant idea.


Pi-Crust on Pi: GPIO made really easy

As you can see from the pictures, the assembled Pi-Crust is a small L-shaped board which clips onto the GPIO pins and routes them to a set of well-spaced connectors clearly marked with their function: SPI, UART, I²C, GPIO and so on. This makes accessing the bus you want a doddle and saves you from either looking at a pin-out reference sheet every time you want to connect the Pi to something, or learning the whole GPIO array by heart.

No longer. Now I can simply drop my wires into clearly marked GND, 3V3, SDA and SCL and start sending bits and bytes back and forth between the Pi, a four-digit, seven-segment LED and a light-level sensor. Or SPI’s MISO, MOSI, SCLK et al. Or UART’s RX and TX.


All the Pi’s GPIO ports, clearly marked, plus extra power and ground connections

Another particular advantage the Pi-Crust offers is that it uses female connectors rather than male ones, just like the Arduino boards do. This means you can work with simple jumper wires – you don’t need gender-bending intermediary cables – and you’re not going to make contact with the adjacent pin by mistake.

The Pi-Crust doesn’t use the usual 25-pin female IDC connector on its base to grasp the Pi’s pins. Instead it uses an ingenious connector that allows it to sit just a few millimetres above the Pi’s own board. There’s a hole cut in the Crust to accommodate the Pi’s camera connector. The Crust’s own connector is ingenious because without it the female headers on the upper side of the board would reach well above the height of Pi’s own components, ensuring the device wouldn’t fit inside a Pi case.


The Pi-Crust in pieces. Source: ModMyPi

And that’s one of the Pi-Crust’s raisons d’etre: it’s supposed to lie sufficiently low to fit inside a case. Ergo, you can leave it in place. This appeals to me because, favouring neatness, I don’t like leaving my Pi lying around with an extender cable hanging off it. With the Pi-Crust, I reasoned, I could lose the cable, and just pop the top off my case and start plugging wires into those female headers whenever I needed to.

What sold me was ModMyPi’s claim: “If you have a case for your Raspberry Pi, this board should fit inside it.” This echoes a claim on the Github page of Joe Walnes, the guy who invented Pi-Crust. I’m currently using one of ModMyPi’s cases, selected because it has a readily removable lid, perfect for easy occasional GPIO access. Surely the Pi-Crust will fit into one of the seller’s own cases?

Like heck it will. An not many others either.


Overhang: the Pi-Crust (blue) extends past the edge of the Pi’s PCB…
even after it has been filed down as much as it can be

Here’s the problem: the Pi-Crust extends a millimetre or two past the edge of the Pi’s own circuit board. Because the Pi fits very snuggly in the ModMyPi case, for instance, this overlap leaves no room for the case’s upper half to close. The internal spars in Pimoroni’s Pibow case likewise get in the way of the Pi-Crust.

About the only good case I know of into which the Pi-Crust will fit without too much bother is Cyntech’s. But putting it in one of these defeats the object of having the Pi-Crust in the first place: the Cyntech case is designed to be held together with four metal screws. Good though it is, it’s not a case for Pi users who want frequent, ready access to the board.


The ‘ledge’ stops many a Pi case from closing, but it is lower than other Pi components

You can sand down the edge of the Pi-Crust, but this won’t get you very far. You can’t wear it away sufficiently for it to allow the ModMyPi case, for one, to close. If you did, you’d inevitably remove half of the pins by which the board’s novel GPIO connector is soldered to the board – not to mention the lines running from those pins to the female headers.


The Pi-Crust is a good idea – a really very good idea indeed. It makes the Pi’s GPIO pins as accessible as they ought to be, by separating out pins by function and by labelling them clearly. At around £13 it’s a little expensive for what is just a circuit board, a PI attachment and 26-odd female connectors, all of which you have to solder together yourself, but it’s worth it for how well it presents the Pi’s GPIO.

The flaw for me is that it doesn’t fit into any of my Pi cases, so it’s not something I can leave sitting on the Pi, which is why I got it in the first place. I’ll certainly make use of it, but because it can’t be a permanent Pi attachment, its utility is unfortunately limited.

The Pi-Crust costs £13 and is available from ModMyPi. There’s more info at the site.

The Sinclair ZX81: a Raspberry Pi retro restyle – Part 2

Previously on ‘ZX81: a Raspberry Pi retro restyle’: I used a headerless Arduino Leonardo to connect a ZX81 microcomputer keyboard to a Raspberry Pi via USB, using code to handle normal, shifted and function-shifted key presses.

Now read on…

ZX keyboard controller

A new ZX keyboard connected to the USB controller – an Arduino Leonardo

After some searching on eBay, I found an old ZX81 going cheap because it lacked cables, though when it arrived, I found the computer itself to be in excellent condition. Possibly it has never been used, though how if that were the case the cables were lost and the box got so tatty is a mystery I will probably never solve.

Continue reading

The Sinclair ZX81: a Raspberry Pi retro restyle – Part 1

I love the design of the Sinclair ZX81. It was never a great computer, even in 1981. It only had 1KB of on-board RAM, it was slow, it was small, it could only do black and white graphics, and it’s membrane keyboard was useless for fast typing. But it looked fantastic: black, sleek and totally futuristic. Almost all other 1980s microcomputers now look very dated. No surprise there, of course, but the ZX81 still looks amazing.

Hats off to Sinclair Research’s industrial designer, Rick Dickinson, for devising a design that is genuinely timeless.

The ZX81 membrane keyboard

The ZX81 keyboard hooked up to the Pi via USB and Arduino

Continue reading

Practise what you preach

Some months back, I posted a guide to backing up a Raspberry Pi SD card using a Mac. I tested it at the time and it worked. It’ll be good to share this, I thought. So I did.

And a good job too, because this past weekend I needed to cook to my own recipe. A long overdue Pi sudo apt-get upgrade followed by tweaking raspi-config zapped my system software.

Pibow Raspberry Pi case

SD woes

Rebooting the Pi produced nothing but a single flash of the green Activity LED and the reassuring glow of the red Power LED – the hardware probably wasn’t up the spout. Googling confirmed my fear: the software was fritzed.

So I called up my blog entry, just as a reader might, and followed the walkthrough. It took a while for the compressed 16GB image to copy, but I got a working OS. This, second attempt at updating went smoothly.

Hopefully, you won’t need the recovery guide, but if you do, I can confirm it’ll get you out of hot water. Just make sure you have back-up before that happens.

How to build your own Apple iBeacon… with a Raspberry Pi

US department store Macy’s recently said it is implementing iPhone-based tracking tech the better to encourage browsing punters to buy. Of course, Macy has chosen to pitch this as an Apple technology – figuring, presumably, iPhone owners are more receptive to inducements delivered through technology and have more cash to splash than Android fans.

But the fact is, the system Apple calls iBeacon simply makes use of features already part of the Bluetooth Low Energy (LE) spec.

A Pi's UART pins, connected

Can this operate as an Apple iBeacon? Yes it can

This got me thinking: how difficult would it be to build a similar system of my own? Not very hard at all, it turns out. Choose the right kit and it can be quite cheap too. I created my beacon using a £30 Raspberry Pi and a £12 Bluetooth 4.0 USB dongle.

Continue reading

Review: the Fuze, a Raspberry Pi keyboard case and electronics kit

Back in the day of the board computers of the late 1970s – your Scrumpi, your Nascom 1, your UK-101 et al – it was customary to build a case for it out of wood. If you were a better equipped ‘constructor’ – what we used to call ‘makers’ in those far distant days – you’d build a box out of metal.

Folk like Tangerine offered optional cases, but most home micros made do with homemade jobs or nothing at all. Then along came the pre-knighthood Sir Clive Sinclair with his ZX80, and home micros all had to be clad in plastic from then on.


The Fuze looks like an old-style home micro case.

Skip forward 30-odd years and history is repeating itself. The Raspberry Pi is a board computer just like those 1970s offerings, only more powerful, more compact and with better programming facilities than the machine code monitors of yore. Some people even make their own cases, though there’s no shortage of plastic off-the-shelf offerings.
Continue reading