Embedded on the Raspberry Pi Pico lesson plan
A dual core Cortex-M0+ at 125 MHz. PWM on every pin, a 64 bit clock, and pins that do not forgive 5 V.
Objectives and materials
By the end, students can
- Drive a pin, read a pin, and learn what this chip will not tolerate.
- Six lamps from an array, and PWM on any pin you like.
- The monitor both ways, and a loop that never waits.
- A blank page, six lamps and a way to measure what you built.
Materials for the whole unit
- Full-size breadboard
- LED x 6
- Pushbutton
- Raspberry Pi Pico
- Resistor x 6
Every part is already on the simulator’s bench, so there is nothing to buy or hand out. The counts are the most any one lesson uses, if you build it on real breadboards too.
The board
Drive a pin, read a pin, and learn what this chip will not tolerate.
| Lesson | Time | What students do |
|---|---|---|
| First light on the PicoAn LED on GP15, a second one inside the module, and a board that keeps its program in a separate flash chip. Where the RP2040 is different. | 50 min |
|
| Reading a pinA button on GP15 with the pad pull-up on, a lamp on GP14, and the pad configuration that sits under one line of Arduino code. | 50 min |
|
Materials
- LED
- Pushbutton
- Raspberry Pi Pico
- Resistor
Check for understanding
Each student finishes "Reading a pin" on their own, without opening the hints. The simulator checks 6 of its 6 steps as they go.
Then ask each one to explain, in a sentence or two, the last thing it asked of them: "The one thing this board will not forgive".
More than one of everything
Six lamps from an array, and PWM on any pin you like.
| Lesson | Time | What students do |
|---|---|---|
| Six pins and an arrayA dot sweeping along six LEDs, driven from a list of pin numbers. Arrays, loop bounds, and where the idea stops scaling. | 50 min |
|
| PWM on any pinEvery GPIO on this chip has a PWM channel, which is unusual. Slices, channels, and what the divider is actually doing. | 50 min |
|
Materials
- Full-size breadboard
- LED x 6
- Raspberry Pi Pico
- Resistor x 6
Check for understanding
Each student finishes "PWM on any pin" on their own, without opening the hints. The simulator checks 6 of its 6 steps as they go.
Then ask each one to explain, in a sentence or two, the last thing it asked of them: "What PWM is good and bad at".
Talking and timing
The monitor both ways, and a loop that never waits.
| Lesson | Time | What students do |
|---|---|---|
| The board talks and listensUART0, the monitor, and an echo. The one debugging tool you always have, and what it costs to use it. | 50 min |
|
| Timing without delayThe chaser is written with delays, so it can do nothing else. Rewrite it around the microsecond timer and it can do anything. | 50 min |
|
Materials
- Full-size breadboard
- LED x 6
- Raspberry Pi Pico
- Resistor x 6
Check for understanding
Each student finishes "Timing without delay" on their own, without opening the hints. The simulator checks 6 of its 6 steps as they go.
Then ask each one to explain, in a sentence or two, the last thing it asked of them: "What you would use micros for".
Make it yours
A blank page, six lamps and a way to measure what you built.
| Lesson | Time | What students do |
|---|---|---|
| Project: make the sweep yoursSix lamps and a blank page. Change the pattern, count the passes, report them, and measure how long your own loop takes. | 50 min |
|
Materials
- Full-size breadboard
- LED x 6
- Raspberry Pi Pico
- Resistor x 6
Check for understanding
Each student finishes "Project: make the sweep yours" on their own, without opening the hints. The simulator checks 6 of its 6 steps as they go.
Then ask each one to explain, in a sentence or two, the last thing it asked of them: "What you would reach for next".
Teach this unit as a class
Start a class from this course and its 7 lessons are assigned in one go, in order. Students join with a six-character code or printed login cards, and each one’s work comes back to you.
The class tools are free for 30 days for one class of up to 20 students, with no card. The lessons themselves are free either way.