Learn Raspberry Pi Pico/Pico W with MicroPython

The complete getting started guide to get the most out of the the Raspberry Pi Pico/Pico W (RP2040) microcontroller board using MicroPython programming language.

Learn Raspberry Pi Pico/Pico W with MicroPython eBook

GET THE EBOOK »

We are currently running an early Black Friday Deal on our Pico eBook. You can grab it with a 23% discount during the next few days (the discount ends when the timer below hits zero).

Days
Hours
Minutes
Seconds

Learn Raspberry Pi Pico/Pico W with MicroPython eBook is our complete guide to mastering the Raspberry Pi Pico microcontroller board using MicroPython programming language.

With straight-to-the-point explanations, step-by-step instructions, multiple examples for different case scenarios, and more, you’ll start making projects with the Raspberry Pi Pico independently in no time—check the detailed table of contents.

What is a Raspberry Pi Pico/Pico W?

Raspberry Pi Pico W

The Raspberry Pi Pico/Pico W is a relatively recent low-cost microcontroller board developed around the RP2040 chip. This chip was developed by the Raspberry Pi Foundation, the same that developed other popular Raspberry Pi boards.

Unlike previous versions of the Raspberry Pi, the Raspberry Pi Pico is not meant to run an operating system. It is a microcontroller board whose main purpose is to control electronic components through its GPIOs, create automations, and IoT applications—it is completely different from a “regular” Raspberry Pi.

What is a Raspberry Pi Pico Pico W vs Raspberry Pi board

The Raspberry Pi Pico boards are easy to use, and incredibly affordable, available from approximately $6, which makes them widely available to the general public and an excellent tool for teaching electronics and programming concepts.

Other boards with the RP2040 chip should also be compatible with the subjects covered throughout the eBook.

Recommended Board

We recommend getting a Raspberry Pi Pico W. The Raspberry Pi Pico W is a wireless-enabled version of the Raspberry Pi Pico. It comes with an Infineon CYW43439 wireless chip that adds Wi-Fi and Bluetooth support. If you already have a Raspberry Pi Pico (without wireless support), you can still follow along, but you won’t be able to follow the units that require Wi-Fi or Bluetooth.

What is MicroPython?

micorpython logo

Currently, MicroPython is the most popular way to program the Raspberry Pi Pico and that’s what we’ll focus on in this eBook. MicroPython is a re-implementation of Python 3 programming language targeted to microcontrollers and embedded systems like the Raspberry Pi Pico, ESP32, ESP8266, and other boards.

MicroPython is very similar to regular Python but is specially crafted for small devices like microcontrollers. It’s like a lightweight version of Python that’s just right for smaller gadgets.

What’s inside the eBook?

The Learn Raspberry Pi Pico with Micropython eBook is a colorful 600-page long PDF with 13 Modules covering almost everything you need to know to start mastering the Raspberry Pi Pico board with MicroPython programming language. It includes multiple examples with all the source code, schematics, and screenshots that are easy to follow.

Learn Raspberry Pi Pico/Pico W with MicroPython eBook

GET THE EBOOK »

Each module breaks down a specific subject and allows for quick referencing in the future. It covers each subject with a practical approach (click here for the detailed table of contents):

  • Module 1: Introducing the Raspberry Pi Pico
  • Module 2: Setting Up the Development Environment
  • Module 3: Getting Started with Python/MicroPython Programming Language
  • Module 4: Basic GPIO Control
  • Module 5: Interfacing with the Most Popular Environmental Sensors
  • Module 6: Displays: OLED and LCD
  • Module 7: Actuators: Motors and Relay
  • Module 8: Filesystem, File Handling, and Datalogging
  • Module 9: Wi-Fi Networking
  • Module 10: Getting and Handling Time
  • Module 11: Local Web Servers
  • Module 12: MQTT Protocol for IoT
  • Module 13: Bluetooth Low Energy (BLE)

Here’s what you’ll have access to when you get the eBook:

  • eBook in PDF format (13 Modules, ~600 pages)
  • Source code (python files)
  • Unlimited free updates (includes future eBook updates and new projects)
  • Access to our private Forum to ask questions
  • Exclusive access to our Facebook group community

Table of Contents

The eBook comes with 13 Modules. Each module is dedicated to a specific subject. Here’s the detailed table of contents:

MODULE 0: Introduction

Raspberry Pi Pico eBook - Module 0: Introduction

This Module is a quick introduction to the eBook, providing an overview of the modules covered, the learning objectives, instructions on how to follow the eBook, recommended prerequisites, and the parts required to complete the projects.


MODULE 1: Introducing the Raspberry Pi Pico

Raspberry Pi Pico eBook - Module 1: Introducing the Raspberry Pi Pico

This Module is an introduction to the Raspberry Pi Pico microcontroller board. We’ll look at its main specifications, familiarize you with its hardware, and explore its GPIOs and different functions. You’ll learn how to power it and the various ways to program it. In summary, we’ll cover all the basic subjects you need to know to get started.

  • 1.1 – Introducing the Raspberry Pi Pico
  • 1.2 – How to Program the Raspberry Pi Pico?
  • 1.3 – Understanding the Raspberry Pi Pico Hardware
  • 1.4 – Raspberry Pi Pico Pinout
  • 1.5 – Powering the Raspberry Pi Pico

MODULE 2: Setting Up the Development Environment

Raspberry Pi Pico eBook - Module 2: Setting Up the Development Environment

In this Module, you’ll install the software required to program the Raspberry Pi Pico with MicroPython (Thonny IDE), you’ll learn how to establish a connection with the board, upload code, and run your first program.

  • 2.1 – Setting up the Development Environment
  • 2.2 – Installing MicroPython Firmware
  • 2.3 – Writing and Running your First Program
  • 2.4 – Programming the Raspberry Pi Pico using VS Code (for advanced users)

MODULE 3: Getting Started with Python/MicroPython Programming Language

Raspberry Pi Pico eBook - Module 3: Getting Started with Python/MicroPython Programming Language

Learn the basics of MicroPython programming language, a re-implementation of Python programming language targeted to microcontrollers. We’ll cover basic, but fundamental concepts, like syntax, variables, functions, classes, modules, and more.

  • 3.1 – Introducing MicroPython
  • 3.2 – Basic MicroPython Syntax
  • 3.3 – Functions in MicroPython
  • 3.4 – Classes, Objects, and Modules
  • 3.5 – String Formatting

MODULE 4: Basic GPIO Control

Raspberry Pi Pico eBook - Module 4: Basic GPIO Control

You’ll learn how to use the GPIO functionalities and how to interface basic electronics components. We include controlling digital outputs, outputting PWM signals, read digital inputs and analog inputs. You’ll also learn about interrupts and timer events.

  • 4.1 – Digital Inputs and Digital Outputs
  • 4.2 – Analog Inputs
  • 4.3 – PWM – Pulse Width Modulation
  • 4.4 – The Internal Temperature Sensor
  • 4.5 – Interrupts
  • 4.6 – Timers and Event Handling

MODULE 5: Interfacing with the Most Popular Environmental Sensors

Raspberry Pi Pico eBook - Module 5: Sensors

In this Module, you’ll learn how to connect and get environmental data from some of the most popular sensors in DIY hobbyists’ projects. We’ll cover temperature, humidity, pressure, and light sensors.

  • 5.1 – DHT11/DHT22: Getting Temperature and Humidity
  • 5.2 – DS18B20 Addressable Temperature Sensor
  • 5.3 – BME280/BME680 Environmental Sensors
  • 5.4 – LDR and BH1750 Light Sensor

MODULE 6: Basic Displays: OLED and LCD

Raspberry Pi Pico eBook - Module 6: Displays

Interface and display data on the most basic, cheap, and easy-to-use display modules. We’ll cover the OLED and the LCD display.

  • 6.1 – OLED Display
  • 6.2 – LCD Display

MODULE 7: Actuators: Motors and Relay Module

Raspberry Pi Pico eBook - Module 7: Actuators

Learn how to use the Raspberry Pi Pico output pins to control actuators like motors and a relay module. We cover three different types of motors: DC motor, stepper motor, and servo motor.

  • 7.1 – Servo Motor
  • 7.2 – DC Motor
  • 7.3 – Stepper Motor
  • 7.4 – Relay Module

MODULE 8: Filesystem, File Handling and Datalogging

Raspberry Pi Pico eBook - Module 8: File Handling

Interact with the Raspberry Pi Pico filesystem and learn how to handle files and folders. We also cover how to use the Pico’s filesystem to log data permanently into a file (datalogging projects). Finally, you’ll also learn how to read and write data to a microSD card to save data using the Raspberry Pi Pico.

  • 8.1 – Handling Files and Directories
  • 8.2 – Datalogging Temperature to a File (Filesystem)
  • 8.3 – Using a microSD Card for Datalogging
  • 8.4 – Saving Variables Values Permanently (JSON Objects and Files)

MODULE 9: Wi-Fi Networking

Raspberry Pi Pico eBook - Module 9: Wi-Fi Networking

Get started with Wi-Fi on the Raspberry Pi Pico. Learn how to activate the Wi-Fi and connect to a network. You’ll also learn how to make HTTP requests to get useful data from the internet using APIs.

  • 9.1 – Introducing Wi-Fi on the Pico
  • 9.2 – Getting Started with HTTP Requests
  • 9.3 – Getting Data from the Web using HTTP GET Requests
  • 9.4 – Control the Pico Remotely using Adafruit IO
  • 9.5 – Sending Messages to WhatsApp using CallmeBot API

MODULE 10: Getting and Handling Time

Raspberry Pi Pico eBook - Module 10: Time

This Module covers different ways to get date and time using the Raspberry Pi Pico and how to synchronize the Pico internal clock. You’ll also learn how to use an external RTC to accurately track time, even when the board resets or loses power. Finally, you’ll learn the basics of asynchronous programming.

  • 10.1 – Getting Date and Time using the time Module
  • 10.2 – Getting Date and Time using ntptime
  • 10.3 – Synchronize Time using the World Time API
  • 10.4 – Keep Track of Time using a Real Time Clock (RTC) Module
  • 10.5 – Asynchronous Programming using the asyncio Module

MODULE 11: Local Web Servers

Raspberry Pi Pico eBook - Module 11: Web Servers

Turn your Raspberry Pi Pico into a web server that serves files to build web pages. Learn how to use those web pages to display data from sensors and interact with the Pico GPIOs to control outputs.

  • 11.1 – Local Basic Web Server
  • 11.2 – Saving Network Credentials on a Separate File
  • 11.3 – Web Server: Display Sensor Readings and Control Outputs
  • 11.4 – Serving External Files (Filesystem)
  • 11.5 – Asynchronous Web Server with asyncIO

MODULE 12: MQTT Protocol for IoT

Raspberry Pi Pico eBook - Module 12: MQTT

MQTT is a communication protocol widely used in IoT and home automation projects. It’s easy to use and is great for building a system to communicate with multiple devices. You’ll learn how to program the Pico to send and receive MQTT messages and we’ll also take a brief overview of the Node-RED platform to control your board(s) via MQTT.

  • 12.1 – Introducing MQTT
  • 12.2 – Set Up An MQTT Broker
  • 12.3 – Publish MQTT Messages
  • 12.4 – Subscribe to MQTT Topics
  • 12.5 – Control and Monitor your Devices with Node-RED (MQTT)

MODULE 13: Bluetooth Low Energy (BLE)

Raspberry Pi Pico eBook - Module 13: Bluetooth

The Raspberry Pi Pico supports both Bluetooth and Bluetooth Low Energy (BLE). Support for Bluetooth in MicroPython is relatively new. So, resources and information are scarce at the moment. This Module is just a short introduction to BLE and simple examples to set the Pico as a BLE peripheral and central device. We intend to expand this module in the future if the community continues working on Bluetooth with MicroPython.

  • 13.1 – Introducing Bluetooth with the Raspberry Pi Pico W
  • 13.2 – BLE Peripheral and Central

Prerequisites

There’s no previous knowledge required to complete the eBook, but some basic knowledge of simple electronics components like breadboards, LEDs, pushbuttons, etc. is beneficial.

We use a step-by-step teaching approach, so all the modules and corresponding units are straightforward to follow even with no previous experience.

Invitation to Join our Private Forum!

This eBook comes with an opportunity to join our private Forum of like-minded people where you can ask questions about the eBook or other related subjects. You’ll get direct help from us (Rui and Sara) or from other active members of the community.

Download the eBook

  • New eBook – updated April 2024
  • 13 Modules
  • PDF eBook with ~600 pages
  • Source code (Python files)
  • Schematic diagrams
  • Parts list
  • Step-by-step instructions
  • Unlimited updates
  • Exclusive access to our private forum
  • English language
  • Created by Rui Santos and Sara Santos
Learn Raspberry Pi Pico/Pico W with MicroPython eBook

GET THE EBOOK | $35 $27 USD »

Click here to get the eBook | $35 $27 USD

We are currently running an early Black Friday Deal on our Pico eBook. You can grab it with a 23% discount during the next few days (the discount ends when the timer below hits zero).

Days
Hours
Minutes
Seconds

Note: after your purchase, you receive an email with a username and password that you use to access the members’ area and download the PDF eBook.

Have questions? Email me at https://randomnerdtutorials.com/support anytime for any reason.

You won’t regret it. My 60-day money-back guarantee backs up every word in this message. Proceed with confidence. See you inside,

-Rui Santos and Sara Santos

Backed by a 60 day 100% money-back guarantee

If you don’t like the course, I don’t want your money. Seriously, that’s why I offer a 60 days money back guarantee. Email me here and I will promptly refund all your money. No questions, no hassles – it’s that simple.

Frequently Asked Questions

We recommend getting a Raspberry Pi Pico W. The Raspberry Pi Pico W is a wireless-enabled version of the Raspberry Pi Pico. It comes with an Infineon CYW43439 wireless chip that adds Wi-Fi and Bluetooth support.

Yes. Most Modules and Units in the eBook are compatible with both the Raspberry Pi Pico and the Raspberry Pi Pico W. The only disadvantage of using a Pico without wireless support is that you won’t be able to follow the units that require Wi-Fi or Bluetooth.

We recommend using Thonny IDE. But any IDE compatible with MicroPython should work. We also provide an extra Unit for those that want to use VS Code instead.

While the Raspberry Pi Pico and the ESP32 serve similar purposes, the Raspberry Pi Pico is particularly well-suited for learning and education. Its seamless integration with MicroPython and straightforward workflow result in a smoother learning experience.

If you’re already familiar with the ESP32 board, learning the Raspberry Pi Pico with MicroPython can help you learn more about different types of microcontrollers and improve your skills in working with embedded systems. Experimenting with different boards is also great so that we can understand which board and programming language is more suitable for our working style.

There’s no previous knowledge required to follow the eBook. However, some basic knowledge about simple electronics components (breadboard, LEDs, potentiometer, pushbutton, etc.) is beneficial.

That’s true! However, if you don’t want to spend countless hours searching for the right information and if you want to accelerate the learning curve, our eBook is a better option. 

We spent the latest few months curating and putting together all the relevant information and resources so that you can have a pleasant learning experience with only the information that matters.

Our instructions are straight to the point, all projects are tested, and we can help you if you get stuck or have any issues!

This eBook is for those who want to get started quickly with the Raspberry Pi Pico/Pico W board.

The Raspberry Pi Pico boards are intuitive to use and MicroPython is one of the easiest programming languages to learn and write. If you’re new to microcontrollers and programming, this is a great way to get started.

This is also a great resource for teachers who want to introduce their students to physical computing and the IoT world.

If you’re already familiar with other microcontroller boards, you’ll probably find a new favorite board. The workflow for writing code and running it on the board is quick and simple and very less prone to bugs and errors when compared with other boards (based on our opinion and personal experience).

If you get stuck at some point, you can use our forum to post your issue. We answer all the questions. You can also send us an email with your issue, and we’ll try to help as much as possible so that you get all examples working.

Yes, we often update all our eBooks, so everyone who purchases gets free lifetime updates. You’ll also have access to future content that we might add to the eBook. We intend to add a module with some more complex projects to the eBook in the future.

Well, if you don’t like it, we don’t want your money. Seriously, that’s why we offer a 60 days money back guarantee. Email us here and we’ll promptly refund all your money. No questions, no hassles – it’s that simple!

If you still have questions after reading this page please email us here. We’ll do my best to answer your questions as quick as possible.

Meet the Authors

Rui Santos
RandomNerdTutorials.com
Hi! I’m Rui Santos, the founder of the Random Nerd Tutorials blog. I have a master’s degree in Electrical and Computer Engineering from FEUP and I’ve been running the RNT blog for more than 10 years. I’ve written hundreds of tutorials covering the usage of different microcontrollers (ESP32, ESP8266, Raspberry Pi, Arduino, and more) on the Internet of Things and Home Automation fields. We also self-published about a dozen eBooks on these subjects, helping thousands of students, engineers, and hobbyists passionate about electronics all over the world.
Sara Santos
RandomNerdTutorials.com
Hi! I’m Sara Santos, and I work with Rui at Random Nerd Tutorials since 2015. I have a master’s degree in Bioengineering from FEUP. I create, write and edit the tutorials and articles for the RNT and Maker Advisor blogs, and I’ve written several of the eBooks available on the RNT blog. I also help you by answering your questions on our private forum and on our blog’s comments section. I love books, writing, cats, and a hot cup of tea. I also love travel and writing about our travel adventures on our travel blog (tripiwi.com).

See what others are saying about our work

(…) I have 11 of your courses and love all of them. I recommend your courses and web site in all my correspondence for anyone in learning Arduino, ESP32, MicroPython, RaspPi subjects. Even though this is just a hobby for me, your stuff has given me more enjoyable learning than any other authors on this – for over 30 years. Thanks for all you do.

William Taylor

Thank you Rui. Anyone wondering whether you bring value can rely on my word. I’ve purchased hundreds of books over a 45 year career as engineer and entrepreneur. NONE of these books have approached your excellent method of teaching a subject. You have a rare gift as a teacher. Glad to have made the purchases.

Paul

I purchased all of your Random Nerd Tutorials Courses. I have completed the ESP32-CAM Projects and SMART HOME courses and have never seen such great e-books for Raspberry, Arduino and ESP microcontrollers before. Your chosen modules show great possibilities and the step by step instructions are very useful. This saved me a lot of frustration and I could quickly achieve great results. Thank you very much.

Chris Steffes

I want to congratulate you on the manuals you have created, they are the best of the best that I have seen in many years. (… ) Your explanations are very clear and very detailed, as if you were a teacher…

Tino Fernández

I placed the order of these ebooks/courses and have downloaded the eBooks. The ebooks are very informative and very well presented, as is your website(…).

Robert Kyle

I appreciate your eBooks, and especially your support that comes with them! Thank you

Joe Margevicius

I want to thank you for the high quality of your projects. Too many others just list a series of tasks but not what to do when they do not go as planned. The detail that you have put into the writeups is amazing. I am working with my 10 year old grandson to help this interest in electronics and software. It would be much harder without your guides.

Doug Hogg

Thank you. I’ve bought two of your course books and they really accelerate the learning curve with the result I wanted.

Paul Kroshko

This is just a thank you! I’ve used bits of your code in almost all my projects. Because of your tutorilas I managed to get a job yesterday.

Jan Gremmler

AS SEEN ON…

FEATURED LOGOS
Learn Raspberry Pi Pico/Pico W with MicroPython eBook

GET THE EBOOK | $35 $27 USD »

Click here to get the eBook | $35 $27 USD