Tag Archive for Programming

Custom PC, Issue 193

Custom PC Issue 193My Hobby Tech column focuses this month on the Raspberry Pi 4, the amazingly inexpensive M5Stick-C microcontroller platform, and Zach Barth’s game design retrospective Zach-Like.

The column opens with the Raspberry Pi 4 review, a two-page look at the layout, features, functionality, and performance of the latest single-board computer from the Raspberry Pi Foundation. As always, there’s plenty of photography – including thermal imagery, using an in-house process I developed to get the most detail possible by combining visible light and infrared photography into a single print-resolution image.

My look at the M5Stick-C, part of the M5Stack family of products, needs no such clever photography – though there is a shot of the device on my wrist, thanks to a bundled watch strap mount. Designed around the low-cost ESP32 microcontroller the M5Stick-C includes buttons, a full-colour screen, Wi-Fi and Bluetooth connectivity, LEDs, a range of sensors, a built-in battery chargeable over USB Type-C, and the aforementioned watch strap plus a wall-mount bracket, LEGO-compatible mounting bracket, and even a built-in magnet – and all for under £10 excluding VAT. It may not be perfect, but it’s certainly cheap enough.

Cheaper, though, is Zach-Like, a collection of game design documents charting the early days of Zach Barth and his company Zachtronics. Initially available as a limited-run print edition on crowdfunding site Kickstarter, Zach-Like is now available as a free electronic download on Steam in PDF format – and comes with a huge selection of bonus content, including playable versions of several unreleased games and prototypes. At £10, Zach-Like would be a bargain; for free, it’s astonishing.

You’ll find the full column, and a lot more, in Custom PC Issue 193 at your nearest supermarket, newsagent, or on any one of a selection of digital distribution platforms.

The Official Raspberry Pi Beginner’s Guide, 2nd Edition

The Official Raspberry Pi Beginner's Guide, 2nd EditionWhile today’s big news is the launch of the Raspberry Pi 4 single-board computer – which I have treated to a wealth of benchmarks over on Medium – it comes with a supporting product release: the second edition of the popular Official Raspberry Pi Beginner’s Guide, updated for the new hardware.

Inside the book, which is being made available for purchase in a print edition and for free download and redistribution under the Creative Commons Attribution-ShareAlike-NoCommercial licence, the content has been overhauled and updated for the Raspberry Pi 4 and latest Raspbian ‘Buster’ operating system. From the two HDMI ports to the new USB Type-C power connector, all imagery and instructions are bang up-to-date for today’s new hardware release.

The Official Raspberry Pi Beginner’s Guide 2nd Edition is also being bundled with the Raspberry Pi 4 as part of the Raspberry Pi Foundation’s official starter pack: those opting to buy their Pi that way will receive the Raspberry Pi 4, microSD with NOOBS and Raspbian ‘Buster’ pre-loaded, power supply, case, keyboard, and mouse, plus a printed copy of the book to help get them started.

As with the first edition, there’s more to the book than just plugging it in and clicking around the Raspbian desktop: you’ll find step-by-step instructions for programming in Scratch and Python, hardware projects for the Raspberry Pi’s GPIO port, and instructions and examples which use the Sense HAT and Camera Module accessories.

The book is available now in print from all good bookshops and Raspberry Pi resellers, in the Raspberry Pi Store in Cambridge, or can be downloaded for free under the Creative Commons licence on the official Raspberry Pi website.

Custom PC, Issue 188

Custom PC Issue 188This month’s Hobby Tech, my regular five-page column for Custom PC Magazine, takes a look at the Argon One aluminium case for the Raspberry Pi, the now Flash-free Scratch 3 visual programming environment, and Sean McManus’ Mission Python.

First, the case. Created as a single piece of aluminium with a plastic base-plate, the Argon One is more than just a means of protecting a Raspberry Pi: it includes a daughterboard that pulls the HDMI and analogue AV ports to the rear for neater cabling, another that adds a fan for active cooling and a smart power button while also bringing the GPIO header out with colour coding and silk-screened pin references on the case itself, and a magnetic cover to hide said GPIO port when it’s not in use.

More importantly, though, it’s one of only a few cases that actually improves the thermal performance of the Raspberry Pi when installed. Even ignoring the fan, which makes little practical difference to operating temperatures, the difference between uncased and cased is an impressive 24°C thanks to the use of the upper half of the case as a giant heatsink. The only real problem, and it’s one creator Argon Forty claims to be working to resolve, is the hefty voltage drop from the fan-and-power daughterboard: unless you’re using the Argon One 5.25V Power Supply or a similar compatible, expect to see frequent undervoltage throttling.

Scratch 3, meanwhile, has proven itself a worthy upgrade for the popular block-based visual programming environment first created at MIT. While switching the stage and script area around and shuffling a few of the block colours is unnecessary and potentially confusing, new features including integration with translation and text-to-speech APIs and an easy extension manager are definitely welcome – as is the departure from relying on Adobe’s Flash technology. Sadly, though, at the time of writing Scratch 3 still did not support the Raspberry Pi, though work is in progress on that front.

Finally, Mission Python: as the author of a few books myself I know only too well how tricky it is to walk the line between introducing concepts in a friendly and approachable manner and being patronising, as well as trying to aim a publication at a broad age range. Sean McManus, who is no stranger to bookstore shelves, proves it can be done with Mission Python as he walks the reader through creating a game in Python using the Pygame Zero wrapper around the Pygame library. The result is colourful and fun without being in any way condescending, and a definite recommendation for anyone interested in flexing their Python skills.

All this, and the usual selection of articles not written by me, can be found on the shelves of your nearest supermarket, newsagent, or digitally via Zinio and similar services.

Custom PC, Issue 185

Custom PC Issue 185In my regular Hobby Tech column this month you’ll find a detailed review of the Raspberry Pi 3 Model A+ single-board computer, another of the ever-so-slightly less-powerful Digirule2, and of Adam Fisher’s exhaustive Valley of Genius: The Uncensored History of Silicon Valley.

First, the Raspberry Pi. The first model to use the A+ form factor – smaller PCB, only one USB port, full-size display (DSI), camera (CSI), and HDMI ports, analogue audio-video (AV) – in the last four years, the Pi 3A+ is an impressive beast for cramming the full performance of the larger, more expensive Pi 3B+ into a smaller form factor. I was concerned, upon first unpacking, that the smaller PCB would undo the good work on the thermal-transfer front that made the Pi 3B+ such a good improvement on the original Pi 3B; a quick test under a thermal imaging camera, though, showed that I was worrying over nothing.

The Digirule2 is a markedly different beast. While it’s a single-board computer, it’s one which is designed more for fun than functionality: built into the form factor of a ruler, complete with inches and centimetres marked in binary along the upper and lower edges, the Digirule2 is inspired by classic machines like the Altair 8800. Press a series of buttons to program a particular memory location; press another button to switch to the next; and press a third to see your program run on the built-in LEDs. One particularly impressive feature is an eight-slot program storage, allowing you to save and load your programs directly on the device – and all without having to hook up your punch-tape reader/writer.

Finally, Adam Fisher’s Valley of Genius is a book in the mould of Fire in the Valley: an attempt to document the rise and, frankly, continued rise of Silicon Valley and the companies it has birthed. Culled from over 200 individual interviews, the book uses direct quotation rather than any attempt to weave a narrative but dodges dryness by weaving multiple subjects’ remembrances into each themed chapter. The final effect is less an interview and more a conversation between some of the industry’s biggest names, from the birth of the mouse right through to the modern age.

To read the full column, pick up Custom PC Issue 185 from your nearest newsagent, supermarket, or electronically via Zinio and similar distribution platforms.

The Official Raspberry Pi Beginner’s Guide

The Official Raspberry Pi Beginner's GuideToday sees the release of The Official Raspberry Pi Beginner’s Guide, my latest educational book on the remarkable single-board computer and its software and the first to be made available for free download and redistribution courtesy of a Creative Commons Attribition-ShareAlike-NoCommercial licence.

Written in partnership with Raspberry Pi Press, The Official Raspberry Pi Beginner’s Guide walks newcomers through a tour of the Raspberry Pi and what it can do, setting up both the hardware and the software, learning how to navigate the Raspbian desktop, how to write programs in Scratch 2 and Python 3, and even building custom circuits that use the Raspberry Pi’s general-purpose input-output (GPIO) header. If that weren’t enough, there are chapters on using the Sense HAT add-on board, the Raspberry Pi Camera Module, and a handy list of additional resources for when you’ve finally exhausted the book itself.

While it’s my name on the cover, this book is very much a team effort. I’d like to thank everyone at Raspberry Pi Press who was involved in its creation, from the authors of the original projects pulled in and updated in this new publication to eternally-patient project editor Phil King, fantastic technical editor Simon Long, amazing illustrator Sam Alder, and a whole host of others without whom the book would be nowhere near as good as it has turned out.

The book is available to buy now in all good newsagents, supermarkets, and bookstores, or direct from Raspberry Pi Press. The digital edition, as a Creative Commons-licensed PDF without any digital rights management (DRM) restrictions, is available from The MagPi website now.

Custom PC, Issue 183

Custom PC Issue 183In Hobby Tech this month, there’s a look at a project which has genuinely transformed my mornings, a tiny temperature-controlled soldering iron with a hackable firmware, and the latest brain-melting program-’em-up from Zachtronics.

Starting with the game first, Exapunks caught my eye as soon as I saw it announced by developer Zachtronics. Taking the assembler programming concept of earlier titles TIS-100 and Shenzhen-IO, Exapunks wraps them up in a 90s near-future cyberpunk aesthetic alongside a plot driven by a disease called “the phage” which turns victims into non-functional computers. Because of course it does.

Anyone familiar with Zachtronics’ work will know what to expect, but Exapunks really dials things up. From the puzzles themselves – including one inspired by an early scene in the classic film Hackers – to, in a first for the format, the introduction of real though asynchronous multiplayer on top of the standard leaderboard metrics, Exapunks excels from start to oh-so-tricky finish.

The MiniWare TS100 soldering iron, meanwhile, sounds like it could be straight from Exapunks – or, given its name, TS-100: a compact temperature-controlled soldering iron with built-in screen and an open-source firmware you can hack to control everything from default operating temperature to how long before it enters power-saving “sleep mode.” While far from a perfect design – and since supplanted by the TS80, not yet available from UK stockists – the TS100 is an interesting piece of kit, with its biggest flaw being the need to use a grounding strap to avoid a potentially component-destroying floating voltage at the iron’s tip.

Finally, the project: an effort, using only off-the-shelf software tied together in a Bash shell script, to print out a schedule of the days’ tasks on my Dymo LabelWriter thermal printer. Using the code detailed in the magazine, the project pulls together everything from weather forecasts to my ongoing tasks and Google Calendar weekly schedule – along with a word of the day and, just because, a fortune cookie read out by an ASCII-art cow.

All this, and a variety of other topics, is available in the latest Custom PC Magazine on newsagent and supermarket shelves or electronically via Zinio and similar services.

Custom PC, Issue 182

Custom PC Issue 182In my Hobby Tech column this month, I take a look at the disappointing Planet Computers Gemini PDA, the significantly less disappointing Proto-Pic Program-o-Tron, and the recent updates designed to make the Raspbian operating system for the Raspberry Pi significantly more welcoming to newcomers.

First, the Gemini PDA. I’ve long been a fan of the clamshell personal digital assistant (PDA) form factor, and it was with a heavy heart that I finally hung up my Psion Series 5 after it became clear that smartphones had won that particular war. Now, the format is back courtesy of Planet Computers and the crowdfunded Gemini PDA – a design based on the Psion Series 5 and put together by one of the staff responsible for the original, but which misses its mark at almost every turn.

At its heart, the Gemini PDA is an Android smartphone – even the non-4G version, which is simply an Android smartphone with the cellular radio removed. While it’s possible to run a Debian-based Linux on top, the experience is poor – but, that said, no more poor than the buggy Android build supplied with the device, which insists on booting up in German despite being clearly marked as a UK model. The hardware, too, disappoints: performance under Linux is not where it should be, and while the keyboard is a near-perfect match to the original Psion design the clever sliding hinge mechanism is entirely missing in favour of a loose and flimsy metal kickstand that fails to provide nearly enough support.

Many thanks must go to the National Museum of Computing (TNMOC), which kindly provided an original Psion Series 5MX PDA for direct head-to-head comparison during the review.

The Program-o-Tron, after a disappointing start to the month, proved considerably better. Again crowdfunded, the Proto-Pic device is designed to make life easier for those working with Atmel ATmega microcontrollers. Rather than having to program each chip individually from a PC, the Program-o-Tron allows you to hold six hex files on an SD card and flash them onto a chip inserted in the ZIF socket at the push of a button – and, even better, to take a dump of the contents of a chip, including its fuse settings, to clone it without ever needing to touch the original program code.

Finally, the recent update to Raspbian operating system for the Raspberry Pi brought a couple of changes for the better: a lightening of the load when it comes to pre-installed software, complete with a tool to add packages back in on-demand, and a first-run welcome wizard which walks newcomers through configuring the Wi-Fi networking, localisation settings, and choosing a new password. The latter is particularly welcome: since launch, the default for Raspbian has been to keep the ‘pi’ and ‘raspberry’ username and password combination, making it easy for attackers to gain access to systems accidentally or deliberately connected to public networks. By asking users to choose a new password on first boot, the hole is closed.

To read more, pick up Custom PC Issue 182 from your nearest newsagent, supermarket, or digitally via Zinio or similar distribution platforms.

Custom PC, Issue 181

Custom PC Issue 181In this month’s Hobby Tech column I take a look at two LED-adorned educational electronics kits, the Kitronik :GAME ZIP 64 and the Kano Pixel Kit, along with Mark Hardisty’s latest retrogaming project, The Classic Adventurer.

Kitronik’s :GAME ZIP 64, which will henceforth be known as the much easier to both read and type Game Zip 64, is a clever little add-on for the BBC micro:bit educational platform. Designed to mate with the BBC micro:bit’s edge connector, the Game Zip 64 adds 64 individually-addressable RGB LEDs, a major upgrade on the single-colour 25-LED matrix on the BBC micro:bit itself, buttons to form a four-way directional control pad, two fire buttons, a piezoelectric buzzer, and – interestingly – a vibration motor.

While the sample Python programs – Snake and Pong – are pretty poor, Kitronik has produced a series of lesson plans around the device which are absolutely fantastic, and put the £40 asking price well into ‘bargain’ territory for anyone looking to move on from the built-in features of the bare BBC micro:bit itself.

The Kano Pixel Kit is, on the face of it, a similar device: a matrix of 128 LEDs – twice the number of the Game Zip 64 – dominate the front, but control is limited to a function dial and a couple of buttons. It’s also Kano’s first truly standalone product, eschewing the normal Raspberry Pi for an on-board Espressif ESP-WROOM-32 microcontroller. As with the Kano Computer Kit, the Pixel Kit’s software – which, sadly, is not available for mainstream Linux, despite coming in a Raspberry Pi variant – is fantastic, but its development cost is likely behind the eyebrow-raising £75 asking price.

Finally, Mark Hardisty’s latest project – after putting his groundbreaking tome on the history of Gremlin Graphics to bed and recreating some classic artwork in Inlay – is The Classic Adventurer, a magazine dedicated to the glory days of interactive fiction. Available in print and also, all credit to him, as a free-as-in-beer DRM-unencumbered PDF download, each issue is packed with brilliant art and fascinating articles ranging from interviews to reviews with some behind-the-scenes stuff thrown in for good measure. It’s a fantastic project, and definitely one to follow.

All this, plus the usual raft of other people’s work, can be found at your nearest newsagent, supermarket, or electronically via Zinio and similar digital distribution platforms.

 

Custom PC, Issue 178

Custom PC Issue 178This month’s Hobby Tech has a pair of two-page spreads on two very exciting, yet decidedly different, pieces of hardware – the Raspberry Pi 3 Model B+ and the Gamebuino Meta – along with a look at an update to the Arduino Create platform which brings early support for single-board computers.

First, the Raspberry Pi 3 Model B+. As the name suggests, the new board isn’t quite a full generation above the existing Raspberry Pi 3 Model B. It is, however, a considerable upgrade – primarily thanks to a new packaging for the BCM2837 system-on-chip, now known as the BCM2837B0, which vastly improves its thermal performance and boosts its speed from 1.2GHz to 1.4GHz. Elsewhere, the board includes an upgraded and simplified power supply system, gigabit Ethernet – though limited to around 230Mb/s throughput in real-world terms – and dual-band 802.11ac wireless network capabilities. Naturally, the review also includes thermal imaging analysis – this time using a new overlay technique which, I’m pleased to say, offers a significant improvement in image clarity over my previous approaches.

The Gamebuino Meta, on the other hand, is a very different device to its predecessor. Upgraded from an ATmega microcontroller to an Arm chip, the Gamebuino Meta boasts a colour screen, programmable RGB LED lighting, a general-purpose input/output (GPIO) header with ‘developer backpack’ accessory for easy prototyping – in short, it’s a serious upgrade over the device I reviewed back in Issue 134. Despite the upgrades, though, it’s still extremely accessible, allowing users to write their own games using the Arduino IDE and the Gamebuino library with ease.

Finally, Arduino Create. I’ve been meaning to take a look at the cloud-based development environment for a while, but it wasn’t until it added support for single-board computers like the Raspberry Pi – on top of the Arduino boards it already supported – that I found an excuse to dive in. What I found is somewhat rough around the edges, but shows promise: a fully-functional IDE right in the browser, but with the ability to push sketches – with very little modification for the Raspberry Pi – to devices remotely.

All this, plus the usual raft of things I didn’t write, can be found between the crisp paper covers of Custom PC Issue 178 at your nearest supermarket, newsagent, or electronically via Zinio and similar digital distribution services.

HackSpace Magazine, Issue 1

HackSpace Issue 1I’m proud as punch to announce the launch issue of HackSpace Magazine, from the creators of The MagPi Magazine, a Creative Commons-licensed monthly publication aimed firmly at the hobbyist, tinkerer, maker, and crafter community – and you’ll find a four-page head-to-head of education-centric games consoles within.

Designed to sit alongside The MagPi, which focuses on the Raspberry Pi community, HackSpace’s remit is considerably broader: you’ll find everything from features on rival single-board computers through to non-electronic projects – including, in the launch issue, tips on smoking your own bacon and building a three-foot siege weapon from wood.

My contribution to today’s launch issue is a ground-up revisit to four handheld games consoles aimed at those looking to write their own games: the Gamebuino, MAKERbuino, Creoqode 2048, and Arduboy. I’ve written about these four devices in the past for a more general audience, but for HackSpace I was free to really dive into what makes them special – and, of course, include all the latest updates and features since the last time they were reviewed.

As with The MagPi, each HackSpace Magazine issue is available on the day of release for free download under the permissive Creative Commons licence. If you’d like to read the launch copy for yourself you can simply download a PDF from the official website, while print copies are available for purchase online and from all good magazine outlets.