Get Started with MicroPython on Raspberry Pi Pico

by Raspberry Pi

Microcontrollers, like RP2040 at the heart of Raspberry Pi Pico, are computers stripped back to their bare essentials.

You don’t use monitors or keyboards, but program them to take their input from, and send their output to the input/output pins. Using these programmable connections, you can light lights, make noises, send text to screens, and much more

In Get Started with MicroPython on Raspberry Pi Pico, you will learn how to use the beginner-friendly language MicroPython to write programs and connect up hardware to make your Raspberry Pi Pico interact with the world around it. Using these skills, you can create your own electro-mechanical projects, whether for fun or to make your life easier.

Errata (for all versions): If you are using the Raspberry Pi Pico W, you will need to change the definition of led_onboard (pages 46, 48, and 52):

led_onboard = machine.Pin(25, machine.Pin.OUT)

…should change to:

led_onboard = machine.Pin("LED", machine.Pin.OUT)

About Raspberry Pi Press

Raspberry Pi Press is the publishing imprint of Raspberry Pi Trading Ltd., a subsidiary of The Raspberry Pi Foundation. Buying Raspberry Pi Press books and magazines directly helps the Foundation’s charitable mission to put the power of computing and digital making in the hands of people all over the world.

About the authors

Gareth Halfacree is a freelance technology journalist, writer, and former system administrator in the education sector. With a passion for open-source software and hardware, he was an early adopter of the Raspberry Pi platform and has written several publications on its capabilities and flexibility.

Ben Everard is a geek who has stumbled into a career that lets him play with new hardware. As the editor of HackSpace magazine, he spends more time than he really should experimenting with the latest (and not-solatest) DIY tech.