Custom PC, Issue 167

Custom PC Issue 167This month’s Custom PC features a look at the effect of compiler optimisation on applications plus reviews of Google’s AIY Voice Kit for the Raspberry Pi family and Jimmy Wilhelmsson’s Generation 64.

The tutorial, to begin, stemmed from investigations I was carrying out into Google’s Guetzli perceptual JPEG encoder. Having cut my teeth in computing back when every byte – never mind kilobyte – really counted, I have a soft-spot for compression both lossy and lossless. Over the years I’ve toyed with a range of compression algorithms, from LZMA and Robert Jung’s ARJ through to the clever if short-lived Fractal Image Format (FIF). Like most, though, I eventually settled on two popular formats for my image compression needs: JPEG where lossy compression is acceptable and PNG where it isn’t.

Guetzli aims to cut the file size of JPEG files by around a third for no apparent loss in perceived image quality. That was enough to pique my interest, but it comes at a cost: a runtime of minutes per megapixel to recompress each image. As an open-source project, Guetzli is provided in source-code form – so I began to play with the optimisation options available in the GNU Compiler Collection (GCC) to see if I couldn’t speed things up.

As readers of my column will discover, I could indeed speed things up – cutting the time taken to compress the small sample image provided with Guetzli from 14.3 seconds using Google’s precompiled binary version down to just 9.56 seconds. Although not an exhaustive guide to compiler optimisation in general nor even GCC-specific options – a topic which would take a book, rather than a couple of magazine pages, to cover adequately – hopefully the write-up of my experiments will help shine a light on the gains that can be made, the potential pitfalls of excessive optimisation, and the benefits of open-source distribution.

The Google AIY Voice Kit, meanwhile, is something quite special: an add-on for the Raspberry Pi family of microcomputers which, in essence, turns them into a somewhat cut-down version of the company’s Google Home voice-activated assistant platform. Initially distributed with The MagPi Magazine as a cover-mounted giveaway, the kit should soon be available for purchase by the general public – and it’s definitely worth seeking one out.

The kit itself centres around a Hardware Attached on Top (HAT) add-on board, which includes servo and motor control, connectivity for an arcade-style button, and links to a break-out board with a pair of MEMS microphones. Combined with some simple software and a link to Google’s cloud computing platform, the AIY Kit can be made to respond to your natural-language queries or even control external hardware via voice recognition – with some major caveats regarding how often you can use it before you need to start handing over cash for the voice recognition platform.

Finally, Generation 64. Originally written in Swedish by Jimmy Wilhelmsson and with design by Kenneth Grönwall, Generation 64 investigates the influence the Commodore 64 had on the Swedish computing scene – complete with an introduction by the founder of Digital Illusions, also known as DICE, and MOS 6502 creator Chuck Peddle. Translated into English and re-released by Bitmap BooksGeneration 64 is an absolutely fantastic read which I would have otherwise missed had it remained untranslated.

Full details on all of these, plus a bunch more stuff written by people who aren’t me, can be found in Custom PC Issue 167 at your nearest supermarket, newsagent, or digitally via Zinio and rival distribution platforms.

Custom PC, Issue 163

Custom PC Issue 163My work for Hobby Tech this month involved rather more soldering than is usual, in order to assemble the parts required for reviews of the Boldport Club’s Ligemdio and Touchy kits and the Dark Control Raspberry Pi motor control boards – though, at least, the final review of the freshly-launched Debian+Pixel Linux distribution was free of fumes.

First, the Boldport Club. I’ve reviewed one of Saar Drimer’s impressively artistic circuit kits before, back in November 2015, but where you used to have to camp out on the Boldport website to pick up the latest small-production-run kit there’s a new option: monthly subscription. Members of the Boldport Club get a series of parcels, typically but not always including a kit featuring a Saar-designed printed circuit board but almost always being aimed more at the experienced engineer than the absolute beginner.

For a flavour of what Boldport Club members can expect, Saar sent over two kits: the Touchy, a touch-sensitive microcontroller dedicated to the memory of maker Oliver Coles, and the Ligemdio, a handy-dandy USB-powered LED tester. The latter proved far simpler to build than the former: anyone used to beginner through-hole kits would undeniably find the surface mount components on the Touchy a challenge, but therein lies its attraction.

The soldering on the Dark Control boards, by contrast, was considerably less tricky. Created by the Dark Water Foundation and funded via Kickstarter, the Dark Control boards – one for DC motors and the other for ESC motors – are impressive beasts. Designed to mimic the footprint of the diminutive Raspberry Pi Zero, the boards include the ability to run a minimum of six independent motors, include room for a nine-degree sensor add-on, and can be linked to remote control hardware for network-free control of everything from submarines to aerial drones.

Finally, Debian+Pixel is Raspbian for the masses. Like Raspbian, Debian+Pixel is built on top of Debian Linux; like Raspbian, Debian+Pixel uses the Pixel desktop environment; like Raspbian, Debian+Pixel includes a selection of educational software chosen by the Raspberry Pi community. Unlike Raspbian, though, Debian+Pixel runs on almost any x86 PC – meaning you don’t need a Raspberry Pi.

The software is, as you’d expect from a distribution based on one of the oldest Linux variants around, stable. The Pixel interface looks the same whether you’re running on a Pi or a traditional PC, and only the speed at which programs open and run gives it away. Sadly, there are one or two omissions largely as a result of licensing agreements: the handy Wolfram Alpha application is nowhere to be found, as is the extremely buggy Minecraft Pi Edition that saw one release back in 2013 before being abandoned by the now Microsoft-owned Mojang.

For the full run-down of all these shiny things, plus a whole bunch of other stuff written by people who aren’t me, you can pick up the latest Custom PC magazine in your nearest supermarket, newsagent, or electronically via Zinio and similar digital distribution platforms.

Linux User & Developer, Issue 167

Linux User & Developer Issue 167This month’s Linux User & Developer includes my review of Pimoroni’s Black Hat Hack3r family of break-out boards, designed for both the mainstream Raspberry Pi and ultra-compact Raspberry Pi Zero single-board computers (SBCs).

While Pimoroni isn’t exclusively focused on the Raspberry Pi platform, it’s no secret that the Sheffield-based company has plenty of ideas in mind for enhancing the popular devices. The Black Hat Hack3r range started out as an internal development tool, designed to make it easier to debug Hardware Attached on Top (HAT) devices – add-on boards which cover the 40-pin general-purpose input-output (GPIO) header on top of the Raspberry Pi – without having to deal with a rat’s nest of cables or easily-knocked debug clips.

The boards are simple at their heart: with no active components, all they do is mirror the GPIO header. A ribbon cable connects the board – available in full-size and a Mini variant designed specifically for the Raspberry Pi Zero – to the Pi’s GPIO header, and the HAT under investigation is connected to the mirrored header. A third header then provides full access to all 40 pins, which opens up a wealth of possibilities: you can add additional hardware at the same time as the HAT, sniff signals coming to or from the HAT for debugging or reverse engineering reasons, or even connect more than one HAT to a single Pi by daisy-chaining multiple boards.

I’ve long been a fan of Pimoroni’s designs, and the Black Hat Hack3rs are no exception to the company’s rule of clever boards with attractive layouts and finishes. To get my full opinion, though, you’ll have to pick up a copy of Linux User & Developer Issue 167 from your nearest newsagent, supermarket, or electronically via digital distribution services such as Zinio.

The MagPi, Issue 40

The MagPi Issue 40This month’s MagPi, the official magazine of the Raspberry Pi Foundation, is just a little bit special: it is, to my knowledge, the first magazine ever to include a cover-mounted computer. The release of the magazine today also represents the launch of a brand-new Raspberry Pi model: the Raspberry Pi Zero.

I’ve been lucky enough to have been playing with the Pi Zero for some time, having worked on three of the hardware projects you’ll find between the covers of this extra-special issue. After peeling the Pi Zero from the cover, readers will be shown how to solder general-purpose input/output (GPIO) headers onto its otherwise extremely flat face, connect its serial port to a computer for use as a true random number generator (TRNG), and use it with an existing HAT add-on to act as a mood lamp.

The three projects I created for this issue were chosen from a long, long list. The Pi Zero is an exciting device: it features the same specifications as the Raspberry Pi Model A, but in a brand-new form factor a fraction of the size of the original. Naturally, some features have been cut: just like the Model A there’s no Ethernet chip, but there are also no CSI or DSI connectors and no analogue audio or video ports – though composite video is broken out to a solder pad for the adventurous. The ports that do remain have also been modified: the full-size HDMI port is replaced by a mini-HDMI, and the full-size USB port is a micro-USB port which requires a USB On-The-Go (OTG) adapter before it can be connected to standard USB peripherals.

In doing this, the Foundation has created a device that excites me even more than the full-size models. With a production cost so low that it can be cover-mounted on a high-street magazine, it’s now possible to put a full Linux computer in more project than ever before – and with a simple low-cost USB OTG adapter and a Wi-Fi dongle, it can be networked for a total outlay of well below $10. It is, in short, a game-changer, and I look forward to working on many more Pi Zero-related projects in the near future.

If that wasn’t enough, you’ll also find my review of the Tenma 60W Digital Soldering Station which has been my trusty companion in various projects over the last couple of years. It’s always nice to be able to give a device a good, long-haul test before drawing your conclusions and I’ve certainly put the miles in on the Tenma. As I warn in the review a hobbyist doesn’t strictly need a soldering station, but it does make life easier – and the low cost of this unit, purchased from CPC, makes it easy to recommend for those who fancy an upgrade.

All this, plus more – and, remember the cover-mounted Pi Zero – is available in your nearest WH Smith. The magazine itself is also available as a DRM-free PDF download from the official website, licensed under Creative Commons terms, but obviously you’ll have to buy a Pi Zero separately if you want to follow along with any of my projects.