The MagPi, Issue 106

The MagPi Issue 106This month’s issue of The MagPi Magazine includes another of my tutorials for those looking to get started with the MicroPython platform on the Raspberry Pi Pico microcontroller: a Pico-powered burglar alarm driven by one or more passive infrared sensors.

Originally written as part of Get Started with MicroPython on Raspberry Pi Pico: The Official Guide, my guide to physical computing on Raspberry Pi’s first-ever microcontroller development board, the burglar alarm tutorial builds up step-by-step from introducing a single passive infrared motion sensor to interfacing with multiple sensors, printing status reports over the serial console, and triggering a piezoelectric buzzer in place of a real alarm’s rather louder horn.

As with other tutorials written for the book, full source code – in MicroPython – is provided, along with wiring references designed to make it as easy as possible to add the components to a Raspberry Pi Pico installed on a solderless breadboard. There’s scope for further extension, too: adding break-beam sensors, glass-break sensors, or a code pad for disabling and enabling the alarm on-demand.

The MagPi Issue 106 is available at now at all good newsagents and supermarkets, online with global delivery, or as a Creative Commons-licensed DRM-free zero-cost PDF download on the official website.

The MagPi, Issue 105

The MagPi Issue 105This month’s The MagPi Magazine includes a six-page tutorial I originally wrote as part of Get Started with MicroPython on Raspberry Pi Pico: The Official Guide, my well-received guide to physical computing on Raspberry Pi’s first-ever microcontroller development board: a two-player reaction-testing game.

As with all projects in the book, the reaction game is designed to build up gradually. The reader is first taken through wiring up a simple circuit with a single LED and a single button, using one to trigger the other. Gradually, the complexity is increased: using the LED to trigger a countdown stopped only when the button is pushed, giving the user a look at how quickly they can react.

The project’s culmination comes with the integration of multiplayer: two buttons are used, and whichever player hits their button first is declared the winner. It’s a simple game, admittedly, but a surprisingly competitive one – and one which introduces a range of core concepts for input handling, timing, and conditional statements.

The MagPi Issue 105 is available at all good supermarkets and newsagents, online with global delivery, or as a Creative Commons-licensed DRM-free no-cost PDF download on the official website.

The MagPi, Issue 104

The MagPi Issue 104Inside The MagPi Magazine this month you’ll find five pages of step-by-step tutorial walking through the creation of a functional traffic light simulator using the Raspberry Pi Pico microcontroller board – taken from my latest book, Get Started with MicroPython on Raspberry Pi Pico: The Official Guide.

All the projects in the book, the traffic light simulator being no exception, work step-by-step in building the simplest possible incarnation of each then adding increasing complexity – and in doing so introducing new concepts. In the case of the traffic light simulator, it starts off as a simple set of three LEDs which are under timed control.

As the project progresses, the reader adds a button to act as a trigger for a pedestrian crossing – which adds the concept of threading, taking advantage of the second CPU core on the Raspberry Pi Pico’s RP2040 microcontroller – before finishing the project with a buzzer providing audible feedback for when it’s safe to cross.

The MagPi Issue 104 is available in all good supermarkets and newsagents now, online with global delivery, or as a Creative Commons-licensed DRM-free PDF download on the official website.

The MagPi, Issue 103

MagPi Issue 103This month’s The MagPi Magazine carries my six-page guide to getting started with physical computing projects using the newly-launched Raspberry Pi Pico, the first microcontroller in the Raspberry Pi family.

Taken from my book, Get Started with MicroPython on Raspberry Pi Pico: The Official Guide, the tutorial walks the reader through programming the Raspberry Pi Pico using MicroPython – starting with the physical computing equivalent of “hello, world,” lighting up an LED. No additional hardware is needed for this part: the Raspberry Pi Pico includes a surface-mount user-addressable LED at the top of the board.

The reader is then shown how solderless breadboards work, introduced to importing MicroPython libraries and handling delays, how external LEDs require resistors, how to read a button input, and finally how to put it al together into a simple circuit which can toggle the LED based on the user’s button presses.

The MagPi Issue 103 is available at all good supermarkets and newsagents, online with global delivery, or as a Creative Commons-licensed DRM-free no-cost PDF download on the official website.

The MagPi Magazine, Issue 102

The MagPi Issue 102This month’s MagPi Magazine celebrates the launch of the new Raspberry Pi Pico with my 14-page feature introducing the first Raspberry Pi microcontroller, the first in-house silicon which powers it, and walking the reader through getting started programming the device with MicroPython – as well as talking to three of the people behind the effort.

Built around the RP2040, the first silicon chip produced by Raspberry Pi’s in-house ASIC team, the Raspberry Pi Pico is a fascinating device. While accessible enough for education, thanks to MicroPython support and a breadboard-friendly layout, it’s also designed to work as a module for industrial and embedded projects – and even launches with a port of TensorFlow Lite for machine learning work.

My feature begins with a look at the Raspberry Pi Pico and the RP2040, covering all the major features from RP2040’s programmable input/output (PIO) to the handy single-wire debug (SWD) header at the bottom of the Raspberry Pi Pico. As always, there’s plenty of photography.

The feature then moves on to an interview with Nick Francis, senior engineering manager, James Adams, chief operating officer, and Eben Upton, chief executive officer, covering the work done on both RP2040 and Pico, their hopes for the device, and how it aims to pack a surprising amount of functionality into a £3.60 gadget – “cheap as chips,” Adams told me.

Finally, the feature closes with a series of hands-on tutorials walking the reader through setting the Raspberry Pi Pico up on their Raspberry Pi or other computer, flashing the MicroPython firmware, and working on their first physical computing program.

MagPi Issue 102 is available now from all good newsagents and supermarkets, online with global delivery, or as a DRM-free PDF download under a free-as-in-speech Creative Commons licence. The Raspberry Pi Pico is also the topic of my latest book, Get Started with MicroPython on Raspberry Pi Pico: The Official Guide.

The MagPi, Issue 100

The MagPi Issue 100For this bumper issue of The MagPi, celebrating 100 issues since its launch as a fanzine and subsequent adoption as the official Raspberry Pi magazine, I take a deep dive into the company’s latest single-board computer: the very-nearly-all-in-one Raspberry Pi 400.

Built into a keyboard housing, the Raspberry Pi 400 is almost everything you need: just add a USB Type-C power supply, microSD, mouse, and display. For those buying the Personal Computer Kit – previously the Desktop Kit – that’s reduced to only needing an external display. Better still, the design includes the Raspberry Pi family’s first passive cooling system – and a speed boost from 1.5GHz to 1.8GHz.

Across the hefty 12-page feature I take the reader on a visual tour of the new board’s external ports and internal features – stripping it down to the surprisingly large single-board computer ensconced within – before taking a break for an interview with principal hardware engineer Simon Martin and Raspberry Pi Foundation founder Eben Upton on the project’s origins and development.

Benchmarks follow, putting hard numbers to the speed boost that has seen the CPU clocked from the default 1.5GHz on the Raspberry Pi 4 to 1.8GHz on the Raspberry Pi 400. As with previous launches, these include historical measurements going all the way back to the original Raspberry Pi Model A and Model B – detailing the performance of every board, bar the industrial-focus Compute Modules, across synthetic and real-world workloads.

The full review is available now in The MagPi Issue 100 from supermarkets and newsagents, online with global delivery, or as a free Creative Commons licensed PDF download on the official website.

The MagPi, Issue 99

The MagPi Issue 99This month’s The MagPi, the official Raspberry Pi magazine, includes a hefty spread taking a look at the newly-launched Raspberry Pi Compute Module 4 – bringing the power of the Broadcom BCM2711 to the Compute Module form factor for the first time.

Well, sort of: the new Raspberry Pi Compute Module 4 is actually a wholly new form factor, ditching the old SODIMM edge connector in favour of two high-density connectors on the underside. While that means no backwards compatibility with existing Compute Module carrier boards, third parties have stepped up and launched interposer boards to let you squeeze the new board into old designs.

Having been provided with pre-release access to the Compute Module 4 and its IO Board, my launch feature takes a look at the physical layout and the components that go into the board – with macro photography, including coverage of the high-performance eMMC storage on-board selected models – and runs through a selection of benchmarks testing everything from synthetic and real-world performance to footprint and weight.

One particularly interesting aspect of the benchmarking, and one which will inform designs based around the new module, was thermal throttling analysis: the Raspberry Pi 4 is known to run reasonably hot, though enhancements since launch have brought the temperature down considerably, and moving the same technology into a smaller footprint means the Compute Module 4 gets toasty warm. As Raspberry Pi Foundation founder Eben Upton explained, passive cooling is going to be a must for most designs.

The MagPi Issue 99 is available now from all good newsagents and supermarkets, online with global delivery, or as a free-as-in-speech download under a Creative Commons licence.

The MagPi, Issue 94

The MagPi Issue 94This month’s The MagPi Magazine celebrates the launch of the Raspberry Pi 4 Model B 8GB, the latest single-board computer from the Raspberry Pi Foundation – and the most expensive and highest-specification model to boot.

My cover feature for the launch begins with an overview of the board, which is effectively identical to the previous 1GB, 2GB, and 4GB models bar the memory module in use. With 8GB of LPDDR4 on board, it has twice the memory of its nearest predecessor – and eight times the entry-level model, since pseudo-retired when falling memory prices brought the cost of the 2GB model down to the same level as the 1GB.

The next two pages diverge from my usual launch-day coverage, replacing benchmarks with a dive into the sort of use-cases that could justify moving from 4GB to 8GB of RAM: storage caching, disk-free computing, in-memory databases, virtual machines and containerised applications, machine learning and the like.

The reason for the shift away from benchmarking is simple: in repeated testing the Raspberry Pi 4 Model B 8GB proved absolutely identical in performance to any other model of Raspberry Pi 4, unless the workload exceeded available free memory. While it would have been easy to develop synthetic benchmarks which would show a dramatic improvement in performance for the new model, it would have been misleading to anyone expecting to see a speed boost for day-to-day computing.

From there, the feature moves on to an interview with Raspberry Pi Foundation founder Eben Upton on the timing of the launch – “[it is] absolutely as soon as we can,” he told me during the interview, “the memory packages we’re using are literally some of the first off the production line, a brand-new, shiny memory technology” – the sort of user the new model targets, the Foundation’s work on a 64-bit version of the Raspberry Pi OS which launches in beta today alongside the new board, and the future of the Raspberry Pi 4 range which, sadly, is not likely to include a 16GB model.

The full feature is available to read now in The MagPi Issue 94, available to purchase with global delivery or to download as a free Creative Commons-licensed PDF on the official website.

The MagPi, Issue 93

The MagPi Issue 93In this month’s The MagPi Magazine you’ll find my cover feature on working from home using a Raspberry Pi as a fully-functional desktop computer – and, as an added bonus, my photography of the TBBlue ZX Spectrum Next.

First, the cover feature. With a massive explosion in the number of people working remotely worldwide, and the corresponding shortages in hardware and accessories, now is a great time to look towards the Raspberry Pi as a functional alternative to traditional PCs. The six-page feature is split into three sections. The first of these sections looks at installing a Raspberry Pi Camera Module – or the newly-launched Raspberry Pi High Quality Camera Module – or USB webcam and using it for video conferencing via Google Hangouts.

The second section looks at online collaboration platforms, from Google Docs and Google Drive to Slack, Discord, and Firefox Send. The last section takes a look at LibreOffice, the open-source equivalent to Microsoft Office which is pre-installed in Raspbian Linux and fully compatible with the Raspberry Pi. Finally, a sprinkling of tips and tricks complete the feature.

The ZX Spectrum Next review, meanwhile, was written by The MagPi’s editor Lucy Hattersly, but illustrated by me: My hero shot of the ZX Spectrum Next, plus a close-up of the Rick Dickinson-designed keyboard which proved responsible for a two-year delay on the device as it was tweaked for maximum quality and performance, grace the two-page feature alongside a pair of images taken from the ZX Spectrum Next promotional materials.

All this, and more, is available in both the print edition and the free Creative Commons-licensed PDF download from the official magazine website.

The MagPi, Issue 90

The MagPi Issue 90This month’s MagPi, the official magazine of the Raspberry Pi Foundation, comes with a surprise bonus: a cover-mounted stand, available to download for 3D printing or laser cutting in the digital version, designed to hold up to three Raspberry Pi 4s in a vertical orientation. Naturally, it needed testing – and so you’ll find a feature comparing the stand to five commercial cases also designed to improve cooling.

My thermal testing feature in Issue 88 proved that putting the Raspberry Pi on its edge, rather than flat on a desk, could improve cooling and allow it to run faster for longer. The same test workload is repeated here on the bundled vertical stand plus cases from FLIRC, Argon40, Pimoroni, The Pi Hut, and SensorEq – and many thanks to all involved for their assistance with review samples.

Each case is installed as per the manufacturer’s instructions, then the Raspberry Pi 4 Model B 4GB inside is given a ten-minute run of a very thermally-intensive workload – an unlocked glxgears to put load on the GPU and a four-thread stress-ng FFT run for the CPU – followed by five minutes cooling. The temperature of each is graphed along with the operating speed of the CPU – which drops as the temperature rises above 80 degrees Celsius.

Finally, each case was placed underneath a thermal camera to see how effective it is at distributing the heat from the SoC. With the notable exception of one case – the case from The Pi Hut, which is constructed from light-transparent but thermally-opaque Perspex acrylic – the imagery helps to indicate whether a design has thermal headroom for longer workloads or is already working as hard as it can.

The feature is available in full in The MagPi Issue 90, which can be purchased in print from newsagents and supermarkets now or with global delivery from the Raspberry Pi Press store. It’s also available for free download under a Creative Commons licence; while the digital version doesn’t include the cover-mounted stand for obvious reasons, the design can be downloaded for home or commercial 3D printing or laser cutting from the magazine’s GitHub repository.