All paths

MicroPython on the Pico

Real Python on a Raspberry Pi Pico: blink and the REPL, buttons and if, loops and PWM, a knob on the ADC, lists and functions on an LED bar, an OLED on I2C, and a reaction game boss.

Raspberry Pi PicoFree7 lessons3 h4 chapters1,560 XPEmbedded engineering · Intermediate+150 XP

0 of 7 done

What you will build

3 projects, built step by step

7 lessons in 4 chapters, about 3 hours on a simulated Raspberry Pi Pico. Free, in your browser, every step checked by the simulator.

Chapter 1 project

Buttons and if

Read a button with a pull-up, make a choice with if and else, and print only when something changes.

Open it in the simulator
Chapter 2 project

Read a sensor with the ADC

A knob on GP26 turns into a number with ADC, and that number sets the LED brightness. Then a little math turns it into a percent.

Open it in the simulator
Chapter 3 project

I2C to an OLED screen

Two wires carry a whole conversation: find the OLED and a weather sensor on I2C, then draw text on the screen.

Open it in the simulator
The map

Chapter by chapter

Each lesson opens when the one before it is done, and each chapter ends in a project.

Chapter 1

First Python

Blink two LEDs, type Python live into the board, and make choices with if.

  1. Open156 XP

    Blink, and talk to the board

    Your first MicroPython program blinks two LEDs, then you type Python straight into the board with the REPL.

    0 of 4 steps

  2. ProjectLocked312 XP

    Buttons and if

    Read a button with a pull-up, make a choice with if and else, and print only when something changes.

    0 of 4 steps

Chapter 2

Loops and sensors

Fade with a for loop and PWM, and read a knob with the ADC.

  1. Locked156 XP

    Loops and a PWM fade

    A for loop with range() steps an LED from dark to bright and back, using PWM to fake the levels in between.

    0 of 4 steps

  2. ProjectLocked312 XP

    Read a sensor with the ADC

    A knob on GP26 turns into a number with ADC, and that number sets the LED brightness. Then a little math turns it into a percent.

    0 of 4 steps

Chapter 3

Bigger programs

Lists and functions on an LED bar, and text on an OLED over I2C.

  1. Locked156 XP

    Lists and functions on an LED bar

    Six LEDs in one list, and two small functions that turn a number into a moving dot or a growing bar.

    0 of 4 steps

  2. ProjectLocked312 XP

    I2C to an OLED screen

    Two wires carry a whole conversation: find the OLED and a weather sensor on I2C, then draw text on the screen.

    0 of 4 steps

Chapter 4

Boss game

A reaction timer with a random wait, a cheat catcher and a best score.

  1. Locked156 XP

    Boss game: reaction timer

    Wait for the light, then hit the button. Functions, if, loops, random and the board clock come together in one game that keeps your best score.

    0 of 4 steps

Syllabus

Every lesson in the course

All 7 lessons, in order, each with what it covers. Any of them opens in the editor right away.

Chapter 1

First Python

  1. Blink, and talk to the boardYour first MicroPython program blinks two LEDs, then you type Python straight into the board with the REPL.
  2. Buttons and ifRead a button with a pull-up, make a choice with if and else, and print only when something changes.
Chapter 2

Loops and sensors

  1. Loops and a PWM fadeA for loop with range() steps an LED from dark to bright and back, using PWM to fake the levels in between.
  2. Read a sensor with the ADCA knob on GP26 turns into a number with ADC, and that number sets the LED brightness. Then a little math turns it into a percent.
Chapter 3

Bigger programs

  1. Lists and functions on an LED barSix LEDs in one list, and two small functions that turn a number into a moving dot or a growing bar.
  2. I2C to an OLED screenTwo wires carry a whole conversation: find the OLED and a weather sensor on I2C, then draw text on the screen.
Chapter 4

Boss game

  1. Boss game: reaction timerWait for the light, then hit the button. Functions, if, loops, random and the board clock come together in one game that keeps your best score.
Keep going

The next course on your track

MicroPython on the Pico is part of the embedded track, a ladder of courses from zero to expert.

Next course

Connected devices

WiFi, APIs, a web server, MQTT, ESP-NOW and BLE on the ESP32, and a device that keeps going when the network does not.

Open the next course
Track

Embedded track

Arduino, ESP32, Raspberry Pi Pico and STM32: pins, timing, buses, motors, WiFi, registers and debugging, every lesson checked on a simulated board.

See every course on the track
Kits

Build it on your bench too

Every lesson runs in the simulator with nothing to buy. When you want the real thing, these kits have the parts.

Have a kit already?

Find your kit

Pick the starter kit you own and run every lesson in its manual with the same parts on the same pins.

See every kit
Questions

About MicroPython on the Pico

Is MicroPython on the Pico free?

Yes. All 7 lessons of MicroPython on the Pico are free and run in your browser, with nothing to install and no parts to buy before you start.

Do I need a real Raspberry Pi Pico?

No. Every lesson runs on a simulated Raspberry Pi Pico with its parts on the canvas, and the simulator checks each step as you go. When you want to build it for real, the same wiring and code work on a real board.

How long does MicroPython on the Pico take?

About 3 hours: 7 lessons in 4 chapters, each one a few short steps. Your progress is kept, so you can stop after any lesson and pick up where you left off.

What will I build?

Each chapter ends in a project that puts it together: Buttons and if, Read a sensor with the ADC and I2C to an OLED screen.

Where do I start?

With "Blink, and talk to the board", and each lesson builds on the one before it. New to circuits? Electronics basics is the course that starts from zero.