Tag Archive for Programming

The Official BBC Micro:bit User Guide

The Official BBC Micro:bit User GuideToday marks the launch of The Official BBC Micro:bit User Guide, the culmination of a year-long project to create the most complete and accessible guide to using the BBC’s amazing low-cost embedded computing platform everywhere from the home and the hackspace to the classroom.

Written in partnership with the Micro:bit Educational Foundation, The Official BBC Micro:bit User Guide is a collaborative effort. From project editor John Sleeva who worked so tirelessly on The Raspberry Pi User Guide and has brought that same energy to The Official BBC Micro:bit User Guide and technical editor David Whale who made sure that not a semicolon was out of place to the small army of typesetters, proofreaders, copy editors, and others at publisher J. Wiley & Sons, The Official BBC Micro:bit User Guide owes its existence to far more than the person whose name appears on the cover.

Special thanks, too, must go to Zach Shelby, chief executive of the Micro:bit Educational Foundation, for his early support of the project and chief technical officer Jonny Austin who worked to see the project through from start to finish and provided exhaustive feedback to ensure it launched in the best possible condition – not to mention offering his perspective of the BBC micro:bit’s meteoric rise around the globe in the book’s foreword.

Inside the 300-page publication you’ll find step-by-step instructions from unboxing the BBC micro:bit and learning about its components to programming it in JavaScript Blocks, JavaScript, and Python, as well as practical projects which make use of its sensors, buttons, display, and radio module. You’ll have the opportunity to build everything from a wearable rain-sensing hat to a hand-held game, and links to further resources from lesson plans and community-driven content hubs to add-on hardware to expand the BBC micro:bit’s already impressive capabilities are also included.

The Official BBC Micro:bit User Guide is available now in print and electronic formats from Amazon UK, Amazon US, Kobo, Waterstones, Target, O’Reilly, WH Smith, Booktopia Australia, and direct from Wiley, while it can be ordered in at other booksellers under ISBN 978-1119386735.

For those looking for non-English resources, translations are currently in the works with a French edition confirmed for early next year and more expected to follow in due course – and if you’d like to see the book in your own native language, get in touch to discuss how to make that happen!

Custom PC, Issue 171

Custom PC Issue 171This month’s Custom PC magazine has a bumper crop for fans of Hobby Tech: a four-page shoot-out of do-it-yourself handheld games consoles on top of my usual five-page column, which this time around looks at setting up Syncthing on a Raspberry Pi, building the Haynes Retro Arcade Kit, and my time running a soldering workshop at the Open Source Hardware User Group (OSHUG) UK OSHCamp gathering.

The workshop first: organiser Andrew Back got in touch with me shortly before the OSHCamp workshop day, held in Hebden Bridge as part of the annual Wuthering Bytes technology festival, was due to take place. The scheduled soldering workshop was at risk, he explained, as the person due to run it was no longer available. I was happy to help, and I’m pleased to report a great day was had by all assembling Cuttlefish microcontroller kits – despite the use of some particularly ancient soldering irons with tips which appeared to be made of freshly-hewn coal!

The Haynes Retro Arcade Kit feels like a device which could have been in the DIY console shootout, but it wouldn’t have fared well. Designed by Eight Innovation and slapped with the Haynes brand, the Retro Arcade Kit is a fiddly and distinctly unrewarding soldering kit which ends up as a particularly basic version of Pong. The coin activation system is its only redeeming feature: two pieces of thick solid-core wire sit side by side, and are shorted out by an inserted metal coin to start a fresh game. Not an original trick, but one well implemented – if you ignore the terrible instructions and poor build quality.

Syncthing, meanwhile, has been a mainstay of my toolbox for years. An open-source project designed to keep files on two or more computer systems synchronised, Syncthing is built with security and convenience in mind – and works a treat on the Raspberry Pi. Given that I was needing to find a new home for my off-site backups anyway, as my regular provider CrashPlan is ceasing its cheapest product line, it seemed natural to write up the process of turning a Pi and a USB hard drive into an off-site backup destination.

Finally, the four-page DIY console shoot-out is a reprint of the same feature as it appeared in PC Pro Issue 277 in mid-September. As before, four Arduino-compatible devices are covered: the Gamebuino, MAKERbuino, Creoqode 2048, and Arduboy.

All this, and the usual selection of things written by others, can be found at your nearest newsagent, supermarket, or electronically via Zinio and similar distribution services.

PC Pro, Issue 277

PC Pro Issue 277This month’s issue of PC Pro includes a four-way Battle Royale of DIY handheld games consoles, starting with the MAKERbuino and Creoqode 2048 also reviewed in this month’s Custom PC and including the original Gamebuino and Arduboy to complete the round-up.

There’s never been a higher focus on teaching kids to program – not even during the height of the microcomputing boom in the 1980s, when every home had a Spectrum and every school a BBC Model B partially funded by the government’s Computers in Schools initiative – but there’s a risk of turning kids off if all they’re doing is moving sprites around on a screen. To address this, a number of inventors have come up with physical devices to target instead: from the BBC micro:bit, the spiritual successor to the original Acorn-designed BBC Micro, to the handheld consoles in this month’s group test.

Each of the consoles on test have two things in common. The first is obvious: the focus is more on writing your own games, rather than just playing things other people have created. The second lies under the hood: all four consoles on test are based on Atmel microcontrollers and are compatible with the popular Arduino IDE programming environment.

There are more differences than similarities, though. The Creoqode 2048 is the most physically impressive – and imposing – machine on test thanks to its large footprint and bright RGB LED display, but falls down with poor supporting documentation and rebranded off-the-shelf parts sold at a massive markup; the Arduboy is, by contrast, the tiniest on test with a wallet-friendly design but limited capabilities. The Gamebuino has long been one of my favourite Arduino-compatible projects, but the MAKERbuino takes the concept a stage further with small hardware improvements and a shift from a pre-assembled unit to a solder-it-yourself kit using entirely through-hole components.

If you want to know which device walks away as the king of the hill, though, you’ll have to pick up the latest issue of PC Pro either physically at all good newsagents and supermarkets or electronically via Zinio and similar distribution services.

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 165

Custom PC Issue 165This month’s issue of Custom PC Magazine marks a milestone: four years since I started writing my Hobby Tech column. To celebrate, three reviews spanning its five pages: the Ryanteck RTk.GPIO, the Kitronik Micro:bit Inventor’s Kit, and the Pimoroni GPIO Hammer Header – the only piece of electronic equipment I’ve ever reviewed installed with a hammer.

First, the RTk.GPIO. The brainchild of Ryan Walmsley, interviewed back in Issue 129, the RTk.GPIO is designed to bring all the joy of the Raspberry Pi’s general-purpose input-output (GPIO) header to any PC with a free USB port. A surprisingly sizeable red-hued circuit board, the RTk.GPIO includes a Pi-compatible 40-pin GPIO header with pin-out on the silkscreen. A quick pip install of the Python library later, and you can pretty much take any RPi.GPIO program and have it run natively on your Windows, Linux, or macOS machine.

Perhaps the biggest power of the RTk.GPIO is in assisting with the development of software for Pi add-ons, using the extra computing power of a desktop or laptop to make your life easier then allowing you to transfer your program to a real Raspberry Pi with minimal changes once complete. Its only real downside, in fact, is price: it’s more expensive than picking up a Raspberry Pi Zero and turning it into a USB device, though undeniably smoother to use.

The Kitronik kit, meanwhile, is one of a range of add-ons I’ve been playing with for my upcoming Micro:bit User’s Guide. Based around a GPIO expansion board for the micro:bit’s edge connector, the kit comes with mounting plate, solderless breadboard, jumper wires, and all the components you need to work through the included full-colour tutorial book – plus, in the version I picked up, the micro:bit itself, though the kit is also available without for those who already have the BBC’s miniature marvel.

In the years I’ve been playing with hobbyist electronics, I’ve seen these kits go from the most hastily thrown together things to extremely polished collections of hardware – and Kitronik’s kit definitely sits at the right end of that spectrum. There are nits to be picked, such as the lack of a handy plastic parts box for storage and no use of the lovely breadboard overlay sheets that make the Arduino-centric ARDX kit so easy to use, but it’s hard to imagine someone buying the Kitronik kit and being disappointed.

Finally, the GPIO Hammer Header. I’ve long been a fan of Pimoroni’s products, but the Hammer Header is by far both the simplest and the smartest I’ve seen. Designed for anyone who has purchased a Raspberry Pi Zero and wants to make use of the unpopulated GPIO header but who doesn’t fancy firing up a soldering iron, the kit makes use of cleverly-shaped pins which can make a suitable electrical connection purely mechanically.

The kit gets its name from the acrylic jig used for installation: assemble the jig with the Pi Zero in the middle, then give it a few sharp raps with a hammer to push the pins home. Male and female variants are available, allowing you to quickly install headers on both the Pi Zero and compact pHAT add-on boards, and to my surprise both installed quickly, easily, and without a single poor joint – and in a fraction of the time of soldering all 40 pins by hand.

For all this, and more, pick up the latest Custom PC Magazine from your nearest supermarket, newsagent, or digitally via Zinio or similar services.

Custom PC, Issue 162

Custom PC Issue 162In Hobby Tech this month I take a look at the new Raspberry Pi-based Kano Complete Computer Kit, the eight-bit Arduboy handheld games console, and the undeniably impressive Mirobot educational robot.

To look at the Mirobot first, it’s no secret that I was eager to put it through its paces. Turtle-style robots, which roll around the floor drawing pictures, were immensely popular in the 80s, and the Mirobot looks to bring the technology bang up to date. Entirely open source, from the circuits to the software, the Mirobot is based around two microcontrollers: an Arduino, which handles the actual robotics, and an ESP8266, which provides Wi-Fi connectivity and handles the user interface and ever-so-smart over-the-air (OTA) flashing capabilities.

The Mirobot screams smart from the moment you open the package: its body is made from laser-cut MDF, and the panels form the packaging itself. Everything is put together without tools, and getting up and running requires no software installation – just a device with a modern browser. Multiple programming languages are available, and an API for those who want to roll their own software. In short, I’m a Mirobot fan – and I’d heartily recommend picking one up if you’ve an interest in open-source robotics or programming for education.

The Kano Complete Computer Kit, on the other hand, comes at education from a very different perspective. Billed somewhat disingenuously as a computer you ‘build,’ the kit is at its heart a speaker and case for a bundle Raspberry Pi alongside a customised operating system which is the project’s true selling point.

The Kano kits have been around for a while now, but the Complete Computer Kit as reviewed is new: the computer side has been refreshed to include the latest Raspberry Pi 3, while the bundle also includes a high-quality but non-touch display which accepts the Kano-cased Pi in its rear. It’s a lovely kit, and the software – which you can download for free and run on your own Raspberry Pi – is phenomenal, but its cost definitely lets it down: at £299 RRP it’s massively overpriced.

Finally, the Arduboy. Crowdfunded and hit by numerous delays on its way to market, the Arduboy is an extremely smart little handheld console based around an Arduino-compatible ATmega microprocessor. Games are written in the Arduino IDE then flashed onto the credit card sized device via USB, and play out on a teeny-tiny little single-colour OLED panel which is sadly prone to bad banding.

The Arduboy is a lovely device, but it’s not the first design I’ve seen – and nor is it my favourite. The Gamebuino, reviewed back in Issue 134, still sits at the top for a number of reasons: it’s cheaper, it has better battery life, and it has a clever system for loading games from a bundled micro-SD card. The Arduboy, by contrast, is slimmer, has a clearer display, but can only carry a single game at a time. When you want to switch games, you’ll need a computer with the Arduino IDE – and that’s a major drawback in a portable gaming device.

All this can be yours, alongside the usual raft of interesting things written by people who aren’t me, at your nearest newsagent, supermarket, or from the comfort of wherever you are now via Zinio and similar digital distribution services.

Custom PC, Issue 154

Custom PC Issue 154In this month’s Hobby Tech column I take a good long look at the BBC micro:bit, CubieTech’s latest Cubietruck Plus (Cubieboard 5) single-board computer, and a pack of Top Trumps-inspired playing cards based on vintage computers.

Beginning with the micro:bit, I was lucky enough to be on the receiving end of a press sample when the much-redesigned educational device was finally ready to ship to schools across the UK. Based on the ARM Cortex-M0 microcontroller and boasting integrated Bluetooth Low Energy (BLE), the micro:bit’s main selling point is its excellent support: the web IDE includes four languages suitable for everyone from absolute beginners to experts, there is documentation galore, and the BBC’s TV output includes shows which remind me of the glory days of the BBC Micro and its related programming.

At least, that would be a selling point if the board was actually up for sale. Despite having now mostly fulfilled its promise to ship free micro:bits to all Year Seven pupils in the UK, the BBC has still made no announcement about commercial availability for the educational gadget. Those whose appetites are whetted by the review, then, are best off looking at the CodeBug on which the micro:bit was based, or the new Genuino/Arduino 101 if Bluetooth LE support is a requirement.

The Cubietruck Plus, meanwhile, is an altogether different beast. Kindly supplied by low-power computing specialist New IT, the board is – as the name suggests – a follow-up to CubieTech’s original Cubietruck. The old dual-core processor is long gone, replaced with an Allwinner H8 octa-core chip that blazed through benchmarks with aplomb – and without hitting the boiling-point temperature highs of the rival Raspberry Pi 3.

Sadly, there’s one piece of information that didn’t make it into the review: shortly after the issue went to press, security researchers discovered a debug vulnerability left in Allwinner’s customised Linux kernel which allows any application on the system to gain root permission. Although affecting only selected operating systems, it’s something to be aware of if you’re in the market for an Allwinner-powered SBC.

Finally, the playing cards. Created by start-up 8bitkick following a successful Kickstarter campaign, the deck is nostalgia in a box. The idea is to bring the Top Trumps concept of collectable, trivia-esque comparison gaming to vintage computing: the cards feature everything from the Acorn Atom to the TI-99/4A, plus a joker in the deck in the form of the Raspberry Pi 2 Model B.

The cards are printed with a very high quality finish, but it’s the source of the images that is of most interest: rather than take the pictures itself, 8bitkick has instead scoured the web for images in the public domain or licensed as Creative Commons. It’s no theft, though: while most Creative Commons licenses allow for even commercial reuse if properly attributed, 8bitkick has promised to upload the full deck design to its website for free download and printing.

All this, plus lots of interesting things by people who aren’t me, is only a short trip to the newsagent’s away – or you can stay exactly where you are and grab a digital copy from Zinio or similar services.

Linux User & Developer, Issue 165

Linux User & Developer Issue 165For my regular review in Linux User & Developer this month I had the great pleasure to spend time with the BBC’s first serious hardware project since it teamed up with Acorn in the 80s: the BBC micro:bit.

Originally known as the Micro Bit, the micro:bit is a teeny-tiny microcontroller-based educational programming platform based on the CodeBug. Like the CodeBug, the micro:bit uses a 5×5 LED matrix on its front side as its main method of communicating with the outside world; unlike the CodeBug, the micro:bit includes built-in Bluetooth Low Energy support as well as a gyroscope and magnetic compass, along with the two-button input layout the two share.

With the backing of the BBC, and a major funding drive from Barclay’s which has seen a micro:bit promised to ever Year Seven pupil the UK entirely free of charge, it’s no surprise to see that plenty of companies are involved in the project. At launch, the device boasted no fewer than four programming languages – three provided by Microsoft – in its web-based IDE, along with a neat smartphone app built by Samsung allowing for Bluetooth LE-based interaction and even wireless flashing of programs.

Based on the ARM Cortex-M0 microcontroller (and, oddly, a significantly more powerful Cortex-M0+ which is used exclusively to handle the USB Mass Storage implementation, allowing for mbed-style drag-and-drop flashing without the need to install drivers or a toolchain locally) the micro:bit is impressive, as is the wealth of documentation and supporting materials the BBC has compiled. There’s a catch, mind you: so far, the BBC has not announced commercial availability – meaning we have no idea how much the gadget is going to cost people not included in the generous Barclay’s-funded giveaway programme.

For the full low-down, plus a lot more interesting stuff written by people who aren’t me, head to your local magazine outlet or stay where you are and pick up a digital copy via Zinio or similar services.

Custom PC, Issue 137

Custom PC Issue 137My Hobby Tech column continues in this month’s Custom PC magazine with a tutorial for building a gesture-recognition media controller, a review of the clever Adapteva Parallella single-board computer, and an interview with a personal hero of mine: designer Rick Dickinson.

Looking at the tutorial first, I was recently sent a Hover Board from Hover Labs. Rather than my planned review, I decided the hands-on nature of the gadget – which tracks the user’s finger movements in mid-air – was better suited to a tutorial-style write-up. The result: a simple build using an Arduino Leonardo and the Hover Board to control the playback of media in VLC using gestures. Wave your hand upwards to increase the volume, downwards to decrease it; left skips forwards, right skips backwards; tapping in the centre of the board pauses and resumes.

I was extremely impressed with how easy the Hover Board was to work with, although somewhat disappointed that it would only track gestures rather than absolute positioning. The latter, I have been told by its creators, is coming in a future software upgrade – at which point I’ll be revisiting the board with a more complex project.

This month’s review is a device I’ve been covering from the sidelines for some time: Adapteva’s Parallella. Created as a Kickstarter project to encourage adoption of the company’s many-core Epiphany co-processor architecture, this dinky little single-board computer packs everything a tinkerer could want: a dual-core ARM processor, 16-core Epiphany-III chip and even a user-accessible field-programmable gate array (FPGA) for custom chip design work. If your target application can be made to run on the Epiphany, you can expect impressive compute performance – but before buying one, there are a few points in the review you should read carefully, in particular the GPIO accessibility and ARM core performance.

Finally, my interview. I said Rick Dickinson was a personal hero of mine, and I wasn’t lying: a designer by trade, Rick was hired by Sinclair Research and designed the ZX80 and ZX81 systems, worked on the team that designed the Sinclair ZX Spectrum, and designed the ill-fated business-oriented Sinclair QL. He’s done plenty since, of course – having won awards for work on devices as different as a field microscope and the Gizmondo hand-held console – but the interview focused on a new design project he’s taken on to imagine what a modern computer might look like if Sinclair hadn’t gone bust – starting with a 21st century update to the Sinclair QL.

All this, plus a bunch of interesting stuff I didn’t write, can be yours with a quick visit to your local newsagent or supermarket, or digitally via Zinio and similar services.

Custom PC, Issue 130

Custom PC Issue 130This month’s Hobby Tech column for Custom PC magazine is something of a Pi-extravaganza, featuring a tutorial on how I built a Python-powered doorbell so I wouldn’t miss deliveries when I’m in the upstairs office and a review of the Wolfson Audio Board add-on. If you’re not a Pi-fan, fear not: there’s also my write-up of the first RetroCollect Video Games Market event in Leeds.

That’s a good place to start, in fact. The brainchild of RetroCollect founder Adam Buchanan, the RCVGM brought sellers and buyers from across the UK under the roof of Leeds Town Hall to see what happened. The turn-out was far higher than expected, with a queue snaking through the building and half-way around the outside, but those who stuck with it and got inside were in for a treat.

Exhibitors at the event included people selling 8-bit inspired Hama-bead art, hand-made game-themed jewellery and clothing, and hardware and software from the early 8-bit era right the way through to modern day. Personal highlights included a tour of BetaGamma’s Bas Gialopsos’ latest creations, including hot-rodded Spectrums and a composite video adapter for the Atari 2600, and a chance to chat with Philip Murphy about his North-East Retro Gaming events where over a hundred arcade cabinets, classic consoles and pinball tables are set to free play for the weekend.

For the Pi fan, the tutorial this month demonstrates how a relatively simple hardware hack – a switch connected to the GPIO port – can be used to bring some intelligence to every-day objects. Although I work from home, I often miss deliveries because I’m listening to music and can’t hear the doorbell. While I could have purchased a wireless door-chime with two receivers, I had Pis and switches a-plenty and decided to go for a homebrew solution with Twitter integration – with great success.

Finally for this month, the review of the Wolfson Audio Board. Kindly provided by CPC, the board connects to the GPIO header on the Model A and Model B Revision 2 – but not Revision 1 – Raspberry Pi boards and provides a considerable upgrade to its audio capabilities. To get a full idea of what it can do, you’ll have to buy the magazine – but its highlights include SPDIF digital audio inputs and outputs, high-definition playback, on-board amplification and even a pair of MEMS microphones for stereo recording.

All this, plus a bunch of fascinating stuff that I didn’t write, can be yours at your local newsagent, supermarket, or digitally via services like Zinio.