Raspberry Pi Pico is a new low-cost, high-performance microcontroller board with flexible digital interfaces. Microcontrollers 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 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.
- Set up your Raspberry Pi Pico and start using it
- Start writing programs using MicroPython
- Control and sense electronic components
- Discover how to use Pico’s unique Programmable IO
- Make a reaction game, burglar alarm, temperature gauge, and many more
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)
Note: The book has been reprinted in a new version with the following errata corrected and is now available again to purchase.
Errata (for original print version): To avoid the possibility of erratic readings from inputs such as a push-button or PIR sensor, you are advised to change the pin input setup code line to include a ‘machine.Pin.PULL_DOWN’ call to pull down the pin’s resistor manually. For example:
button = machine.Pin(14, machine.Pin.IN)
…should change to:
button = machine.Pin(14, machine.Pin.IN, machine.Pin.PULL_DOWN)
Conditions of Use
This book is licensed under a Creative Commons License (CC BY-NC-SA). You can download the ebook Get Started with MicroPython on Raspberry Pi Pico for free.
- Title
- Get Started with MicroPython on Raspberry Pi Pico
- Publisher
- Raspberry Pi Press
- Author(s)
- Ben Everard, Gareth Halfacree
- Published
- 2021-01-21
- Edition
- 1
- Format
- eBook (pdf, epub, mobi)
- Pages
- 139
- Language
- English
- ISBN-13
- 9781912047864
- License
- CC BY-NC-SA
- Book Homepage
- Free eBook, Errata, Code, Solutions, etc.
Chapter 1: Get to know your Raspberry Pi Pico 008 Chapter 2: Programming with MicroPython 020 Chapter 3: Physical computing 034 Chapter 4: Physical computing with Raspberry Pi Pico 044 Chapter 5: Traffic light controller 058 Chapter 6: Reaction game 068 Chapter 7: Burglar alarm 080 Chapter 8: Temperature gauge 092 Chapter 9: Data logger 104 Chapter 10: Digital communication protocols: I2C and SPI 116 APPENDICES Appendix A: Raspberry Pi Pico specifications 124 Appendix B: Pinout guide 128 Appendix C: Programmable IO 130