Get Started with MicroPython on Raspberry Pi Pico, 2nd Edition

I’m ecstatic to announce the launch of my latest book: the second edition of Get Started with MicroPython on Raspberry Pi Pico, the best-selling guide to using MicroPython on a Raspberry Pi Pico microcontroller board – now fully updated for the Raspberry Pi Pico W.

The revised larger edition comes with additional chapters specific to the Raspberry Pi Pico W, a device which can do everything the Raspberry Pi Pico can do and more – thanks to the addition of a radio module capable of Bluetooth and Wi-Fi communications. New projects include connecting to a Wi-Fi network, querying remote servers, and hosting a web page capable of interacting with the Raspberry Pi Pico W’s general-purpose input/output pins, plus configuring a Raspberry Pi Pico W as a Bluetooth beacon – connecting, if you’ve got one, to your phone or a second Raspberry Pi Pico W.

It’s not just about the new chapters, though. This second edition offers a complete overhaul: all projects have been brought up-to-date with the latest MicroPython advancements, a now hard-to-find display component has been swapped out for something more readily available at a lower cost, and the ever-talented Sam Adler has created all-new illustrations to bring the book’s look and feel in-line with my recently-launched The Official Raspberry Pi Beginner’s Guide 5th Edition.

As always, I want to thank everyone at Raspberry Pi Press for their work in helping me make this the best book it could be: editor and publishing director Brian Jepson, co-editor Liz Upton, interior designer Sara Parodi, Nellie McKesson in production, photographer Brian O’Halloran, graphics editor Natalie Turner, and head of design Jack Willis, plus everyone else involved in getting the book to shelves today.

Get Started with MicroPython on Raspberry Pi Pico 2nd Edition is available from all good bookshops and Raspberry Pi resellers now, as well as on the official Raspberry Pi Press store for global delivery; if your bookseller doesn’t have a copy, or if you’d like to request it from your library, you can ask for it under ISBN 978-1-912047-29-1.

As always, I hope you have as much fun reading the book as I did writing it!

The Official Raspberry Pi Handbook 2022

The Official Raspberry Pi Handbook 2022The latest issue of The Official Raspberry Pi Handbook, an annual aimed at those looking to find out what they can do with their Raspberry Pi, is out now – and in it you’ll find my in-depth coverage of the Raspberry Pi Pico microcontroller board.

Within the special dedicated Raspberry Pi Pico section of the annual is my two-page introduction to the board, an in-depth spread covering its specifications and the various components which make up the hardware – with plenty of high-quality photography, taken in my in-house studio – and an explanation of exactly what a microcontroller is and how the RP2040 at the heart of the Raspberry Pi Pico works.

You’ll also find my guide to programming the Pico in MicroPython and C/C++, an interview with chief operating officer James Adams and senior engineering manager Nick Francis, comment from Eben Upton, a simple hardware “hello, world” tutorial in MicroPython, and a step-by-step guide to safely soldering headers onto the Raspberry Pi Pico’s general-purpose input/output (GPIO) pins.

There’s also a brief overview of my book, Get Started with MicroPython on Raspberry Pi Pico – which, for those who want to explore the topic further, is available as a free PDF download under a Creative Commons licence.

The Official Raspberry Pi Handbook 2022 is available in all good newsagents and bookstores now, online with global delivery, or as a DRM-free download under a permissive Creative Commons licence.

The MagPi, Issue 108

The MagPi Issue 108This 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 data logger, which makes use of the microcontroller’s ability to run saved code away from a computer and its flash file system.

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, this latest tutorial – one of the last in the book – covers file handling in MicroPython, which can often trip up new users: opening a file for writing erases any previous contents, giving you an empty file if you’re not careful.

The tutorial then moves on to reading and formatting temperature data from the on-board sensor, storing it in a file for later loading, and even running the Raspberry Pi Pico without being connected to a Raspberry Pi or other computer – making use of a special file name to load code on boot without user interaction.

The MagPi Issue 108 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 107

The MagPi Issue 107This 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 temperature sensor, using the analogue-to-digital converter (ADC) built into the RP2040.

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 tutorial builds in the same way as the other projects in the book – introducing core concepts then building step-by-step from a minimum-viable project up to a fully-functional completed device.

As with other tutorials written for the book, full source code – in MicroPython – is provided, along with a wiring diagram which shows how to wire up a potentiometer using two or three pins and why that makes a difference to how it works. The project can be attacked with no additional hardware, however: the temperature sensor is built into the RP2040 microcontroller on board the Raspberry Pi Pico, and readers are free to skip building the potentiometer circuit if they don’t have the component lying around.

The MagPi Issue 107 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 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.

Get Started with MicroPython on Raspberry Pi Pico: The Official Guide

Get Started with MicroPython on Raspberry Pi Pico

Today’s launch of the Raspberry Pi Pico, an affordable breadboard-friendly development board accessible enough for education and powerful enough for industrial use, comes alongside the launch of my latest book: Get Started with MicroPython on Raspberry Pi Pico: The Official Raspberry Pi Pico Guide.

Building on my earlier title The Official Raspberry Pi Beginner’s Guide, Get Started with MicroPython on Raspberry Pi Pico offers newcomers to both the Raspberry Pi Pico and the MicroPython programming language an easy way to get started. Building up from an introduction to the board, electronic circuit concepts, MicroPython in general, and MicroPython on the Raspberry Pi Pico specifically, the book walks through a series of physical computing projects – some requiring only the Raspberry Pi Pico, others using low-cost and readily-available additional hardware components.

Each successive project introduces a new concept, from simply lighting an LED and reading a button input to using hardware interrupts, running code on the second CPU core, and making use of the on-board non-volatile flash memory to store logged data. By the end of the book, the reader should know how to use all the most important features of the Raspberry Pi Pico in MicroPython – even if they started knowing nothing about electronics or programming at all.

As always, thanks must be given to those who helped during the production of the book. Particular thanks must go to Ben Everard, who acted as co-editor and also contributed a chapter on using I2C and an appendix on using the programmable input/output (PIO) functionality; Sam Adler, too, returned to provide eye-catching illustrations without which the book would be a considerably duller read.

Also to be thanked are those who provided technical assistance: Alasdair Allan, Aivar Annamaa, Damien George, Gordon Hollingworth, Graham Sanderson, and Andrew Scheller, along with all those who proofed the book ahead of publication. Not forgetting, of course, others at Raspberry Pi Press who work to bring these books to life and to shelves across the world.

Get Started with MicroPython on Raspberry Pi Pico is available to purchase in print from Raspberry Pi Press with global delivery; it is also available to download as a DRM-free PDF, under a Creative Commons free-as-in-speech licence which allows for unlimited distribution under share-alike terms – making it perfect for schools and clubs.

Custom PC, Issue 206

Custom PC, Issue 206This month’s Hobby Tech feature takes a look at the recently-unearthed Nine Tiles prototype ROM for the ZX Spectrum by installing it on a ZX Spectrum Next, dramatically improves the flexibility of the FLIR ETS320 thermal inspection camera, and pores over classic computer commercials courtesy of coffee-table tome Do You Compute?.

First, the prototype ROM. In my review of the ZX Spectrum Next in Custom PC Issue 202, I mentioned that it’s possible to create new “machine personalities” – both by replacing the read-only memory (ROM) files used in Spectrum mode and by loading new cores onto the FPGA at the machine’s heart. Shortly prior to the ZX Spectrum Next’s launch, the Centre for Computing History received a trove of artefacts from Nine Tiles – including a prototype ZX Spectrum which was used to develop a ROM which never actually made it onto the publicly-launched machines.

The Centre had negotiated to make the ROM image available for free download for educational and academic purposes, which gave me an opportunity to load the ROM onto the ZX Spectrum Next and create the Nine Tiles Prototype as a usable machine personality. What followed was a process of debugging and reverse-engineering in order to make the ROM functional on the Next – a process which, I’m pleased to say, was wholly successful.

The FLIR ETS320, meanwhile, was reviewed back in Issue 201 – and one of my biggest complaints was its incredibly short focal length, meaning that it is only possible to analyse a very small part of a given circuit board under the thermal sensor. While the camera platform is capable of rising up, anything above 70mm away from the device on test is too blurry to be of use – unless, that is, you take advantage of a 3D-printed tool to manually adjust focus. The improvement is stark, as thermal images published in the piece demonstrate.

Finally, Do You Compute? is a book which looks not at the history of computing but at the history of selling computing – specifically, as the subtitle makes clear, “from the Atomic Age to the Y2K bug.” Put together by Ryan Mungia and Steven Heller, the book is a fantastic chronological walk through the shift in computers being for governments and big businesses to any businesses and eventually the home user.

It also has a major flaw, and it’s not one caused by the authors: Apple, for reasons unspecified, declined to provide permission for its adverts to be reproduced in the book. With Apple having been at the very forefront of the personal computing revolution, and well-known for iconic adverts from its 1984 Superbowl commercial to “Think Different” and “Rip Mix Burn,” it leaves a real hole in the book.

Custom PC Issue 206 is available now in supermarkets, newsagents, and online with global delivery via the official website.