RASPBERRY Pi PROJECTS
Sensing the coming of spring, Jonni Bidwell emerges from his state of semi-hibernation and outputs a feature full of glorious maker projects.
Sensing the coming of spring, Jonni Bidwell emerges from his state of semi-hibernation and outputs a feature full of glorious maker projects!
Last year the fourth incarnation of Raspberry Pi launched, and barring some teething issues with firmware and noncompliant USB-C ports, it didn’t disappoint. But once you’ve invested your £35, what are you going to do with that cut-price, cutsized hardware? How do you exploit its abilities? We have a few ideas that use those new features – the gigabit Ethernet, upgraded CPU and GPU, 4K-capable dual HDMI ports –and make the Pi 4 shine.
The Pi 4 is a feasible compact desktop computer at last. Its architecture, including USB 3 ports that no longer share a bus, lends itself to running as a custom NAS controller, a network appliance, or a TV media box. And as software support improves, that firmware firms up and key distros bring their full functionality to the Pi, there’s a world of potential.
Even if you don’t have the latest edition of the Pi, we’ve got projects that will run on its older siblings. The original Pi (now seven years old) is still catered for software-wise, and while it lacks the multimedia capabilities of the Pi 4, it can still be used in exciting projects. And if you want to get into a little more hardcore electronics, we’ve got a few Arduino projects at the end.
The Raspberry Pi is a truly magical device. It has been used in some fantastic applications – flying machines, revolutionising classrooms, voyages to the bottom of the sea, etc. But just as programming often begins with a program that prints “Hello World”, so your first maker project might also be something that appears fairly trivial. Don’t worry, these humble beginnings can be built upon, and before you know it you’ll be makering up a storm. Also, it’s common for first attempts at programming to result in a series of baffling error messages, and it’s likewise common too for our first makes to go awry.
But don’t be put off – syntax errors will continue to haunt you throughout your programming career, and even seasoned makers inadvertently melt the wrong thing from time to time. Soldering mistakes can more often than not be undone, and where they cannot, it’s usually only an inexpensive component that needs to actually be replaced.
The Picam is a great place to begin if you’re looking for inspiration. It connects easily via a ribbon connector and requires virtually no setup. To use it in your programs is a simple matter of: import picamera cam = picamera.picamera() cam.capture(‘/tmp/picam.jpg’)
If you can find a small-enough power supply (or a big-enough jar), then connecting it and a camera to a Pi Zero and sealing the whole arrangement in a jar can help you get nice nature photography. The NO-IR edition of the camera (which has no IR filter) can even see at night, which makes it great for capturing badgers, owls (if you’re lucky) or other nocturnal species (like technical editors writing this at 5am the day before deadline you mean – Ed). Making a rudimentary motion detection program in Python is straightforward, so you don’t need to worry about filling up your SD card with the same photo of the eerie, still darkness.
Aside from building wonderful projects, you can also invest in some wonderful accessories to make your Pi look pretty. Pimoroni’s Pibow cases are extremely popular and come in a range of shapes and sizes. We favour the slimline Coupé models, which enable access to the GPIO pins and have a cut-out on the lid so that a heatsink can be installed on the SOC. If you’re going to be doing prototyping, you can replace the base with a larger one that accommodates a 400-pin breadboard (or two 170-pin breadboards). This keeps your projects a little neater and tidier.
If you have access to a 3D printer or a 3D-printing service, then you can go one step further and design your own case. The quality and range of materials available have evolved an awful lot in the last few years. Gone are the days where your print, if it worked, would be a lumpy, off-white insult to your design. The woodfinish materials are particularly impressive, and you’ll find all kinds of designs on sites such as Thingiverse (www.thingiverse.com) so you can start with something that has the correct dimensions.