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 208

Custom PC Issue 208This month’s Hobby Tech column takes a look at the MicroPython programming environment, SunFounder’s RasPad 3 Raspberry Pi tablet conversion kit, and Frank Gasking’s book The Games That Weren’t.

I’ve been doing a lot of work with MicroPython of late, so it made sense to cover the software for Hobby Tech. Developed by Damien George as part of a crowdfunding campaign launched in 2013, MicroPython takes the popular Python programming language and ports it to microcontrollers – both dedicated PyBoard ranges and third-party hardware. It’s also the inspiration for CircuitPython, a port developed by Adafruit and designed with educational use in mind.

The RasPad 3, meanwhile, is a device I wanted to love. Built in an intriguing wedge shape, the kit takes a Raspberry Pi 4 single-board computer and turns it into a touch-screen tablet. The third in the series, and the first supporting the Raspberry Pi 4, the RasPad 3 is a great idea let down by poor execution – everything from a low-quality display and buggy software to dismal battery life and an incredibly noisy fan.

Finally, The Games That Weren’t is the latest coffee table book from Bitmap Books, based on the website of the same name by Frank Gasking. Built around the same core concept as Phil Atkinson’s Delete, The Games That Weren’t looks at video games – and a small number of related hardware projects, like the Commodore 65 – that never made it to market. At 643 pages it’s a hefty tome, but sadly let down by some high-profile absences – the ‘Van Buren’ build of Fallout 3 is present, but Fallout Online is nowhere to be found as just one example – and a woolly approach to research and citation which leans heavily on weasel-words like “it’s thought,” “some sources say,” and “it’s believed.”

You can pick up the latest Custom PC at your nearest supermarket, newsagent, or online with global delivery now.