Source: https://mokxi.com/teachers/plans/embedded-esp32c3
Updated: 2026-11-11

Lesson plan

# Embedded on the ESP32-C3 lesson plan

A 32 bit RISC-V board at 160 MHz. Its own peripherals, its own 3.3 V rules, and a console at the end of it.

7 chapters, 13 lessons, about 11 hours, on the ESP32-C3-DevKitM-1. Every lesson runs in the browser, with nothing to install.

Start a class from this course

The unit

## Objectives and materials

### By the end, students can

- One pin, then six, and what a GPIO matrix is for.
- A pin that reads, and a handler that runs the moment it changes.
- UART0 both ways, and the start of every protocol.
- One unit of time, and everything else in proportion to it.
- PWM by hand, a filter that averages it, and what the peripheral would have cost.
- Seven segments, then a screen on two wires, then color on one.
- A memory game and a console, both on a breadboard.

### Materials for the whole unit

- Addressable RGB LEDs
- Capacitor
- ESP32-C3-DevKitM-1
- Full-size breadboard
- LED x 6
- OLED display, 128x64
- Piezo speaker
- Pushbutton x 4
- Resistor x 6
- Seven segment display
- TFT display, 240x320

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.

Chapter 1. About 1 h 40 min

## First light

One pin, then six, and what a GPIO matrix is for.

Lesson | Time | What students do

First light on the C3 One pin, one lamp, one program on a RISC-V board. Why 3.3 V changes the resistor you pick, and what the board does while it waits. | 50 min

- The board, and where it sits
- Run it
- The lamp on the breadboard
- Pick a resistor for 3.3 V
- Blink it five times a second
- What a GPIO matrix is

Six pins and a moving dot An array of pin numbers, a loop that walks it, and a sweep that bounces. The first sketch where the code shape matters more than the wiring. | 50 min

- Six lamps, six pins
- Run it
- All the way along
- Watch a pin in the middle
- Make it slow
- Where six pins stops working

### Materials

- ESP32-C3-DevKitM-1
- Full-size breadboard
- LED x 6
- Resistor x 6

### Check for understanding

Each student finishes "Six pins and a moving dot" 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: "Where six pins stops working".

Chapter 2. About 1 h 40 min

## Reading the world

A pin that reads, and a handler that runs the moment it changes.

Lesson | Time | What students do

Reading a pin at 3.3 V A button on GPIO 9 with the pad pull-up on. Why pressed reads low, what 45 k means, and what a floating input really does. | 50 min

- A button with no resistor
- Watch it go low
- And the lamp follows
- Check the output pin too
- Turn it round
- What a floating pin actually does

Interrupts, and what they cost A handler that runs the moment a pin falls, a counter shared with the main loop, and the bounce that makes one press count as four. | 50 min

- Something that happens without being asked
- Run it
- Press it
- Press five, and read the number
- Catch the contacts bouncing
- Debounce it, and know what it costs

### Materials

- ESP32-C3-DevKitM-1
- Full-size breadboard
- LED
- Pushbutton
- Resistor

### Check for understanding

Each student finishes "Interrupts, and what they cost" 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: "Debounce it, and know what it costs".

Chapter 3. About 1 h 40 min

## Talking to your computer

UART0 both ways, and the start of every protocol.

Lesson | Time | What students do

The board talks UART0, the monitor, and the uptime. What a baud rate costs in time, and why printing a float works on a chip that cannot do arithmetic with one. | 50 min

- Nothing is wired, and that is the lesson
- Say hello
- A number with no hardware behind it
- The uptime, from a 52 bit counter
- Add a line of your own
- What printing costs

The board listens Characters arriving into a FIFO, read without blocking, and echoed back with their hex. The first half of every protocol you will ever write. | 50 min

- Two calls, and neither one waits
- Run it
- Type a letter
- Type a capital and read the hex
- Press enter on its own
- From echo to protocol

### Materials

- ESP32-C3-DevKitM-1
- Full-size breadboard

### Check for understanding

Each student finishes "The board listens" 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: "From echo to protocol".

Chapter 4. About 50 min

## Timing you can hear

One unit of time, and everything else in proportion to it.

Lesson | Time | What students do

Timing you can hear Morse is timing and nothing else. One unit of time, five rules, a lamp and a piezo, and a button that moves to the next message. | 50 min

- One number decides everything
- Run it and read the log
- Watch the lamp
- And listen to it
- Move to the next message
- Change the speed

### Materials

- ESP32-C3-DevKitM-1
- Full-size breadboard
- LED
- Piezo speaker
- Pushbutton
- Resistor

### Check for understanding

Each student finishes "Timing you can hear" 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: "Change the speed".

Chapter 5. About 50 min

## Brightness

PWM by hand, a filter that averages it, and what the peripheral would have cost.

Lesson | Time | What students do

Brightness without a PWM peripheral The C3 has an LED PWM peripheral and Mokxi does not model it, so this sketch does it in software. Two lamps, one through a filter, and the cost of doing it by hand. | 50 min

- Two branches, on purpose
- Run it and watch it breathe
- Read the filtered node
- And the lamp behind the filter
- Make the breath faster
- What it would cost in hardware

### Materials

- Capacitor
- ESP32-C3-DevKitM-1
- Full-size breadboard
- LED x 2
- Resistor x 3

### Check for understanding

Each student finishes "Brightness without a PWM peripheral" 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 it would cost in hardware".

Chapter 6. About 2 h 30 min

## Showing something

Seven segments, then a screen on two wires, then color on one.

Lesson | Time | What students do

Showing a number Seven LEDs in the shape of an eight, a table of digits, and a die that tumbles. Where a pin budget starts to hurt. | 50 min

- Seven LEDs and a table
- Run it
- Roll it
- Watch a segment pin
- One resistor for all of it
- Count the pins

A screen on two wires A 128x64 OLED over I2C, bit-banged on two pins. Addresses, acknowledgments, a frame buffer in RAM, and what a redraw costs. | 50 min

- Two wires, many devices
- Run it
- Something on the screen
- A screen is a buffer in your RAM
- What a frame costs
- Put your own thing on it

Color on one wire Sixteen addressable LEDs on a single pin, and a protocol where the length of a pulse is the bit. The timing is the whole problem. | 50 min

- Every LED has a chip in it
- Run it
- Count the lit ones
- All sixteen
- Slow the wheel down
- What sixteen LEDs actually draw

### Materials

- Addressable RGB LEDs
- ESP32-C3-DevKitM-1
- Full-size breadboard
- OLED display, 128x64
- Pushbutton
- Resistor
- Seven segment display

### Check for understanding

Each student finishes "Color on one wire" 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 sixteen LEDs actually draw".

Chapter 7. About 1 h 40 min

## Two things to play

A memory game and a console, both on a breadboard.

Lesson | Time | What students do

Project: a memory game Four lamps, four buttons and a sequence that grows. State, arrays and input handling in one thing you can actually play. | 50 min

- The game, stated before it is built
- Run it
- Watch it show you
- Answer it
- Get it wrong on purpose
- Make it better

Project: a console A color TFT, two buttons and a piezo, running a game at forty frames a second. What a frame budget is and where it all goes. | 50 min

- A screen, two buttons and a speaker
- Run it
- Play it
- Miss it
- Where the 25 milliseconds go
- Make it your game

### Materials

- ESP32-C3-DevKitM-1
- Full-size breadboard
- LED x 4
- Piezo speaker
- Pushbutton x 4
- Resistor x 4
- TFT display, 240x320

### Check for understanding

Each student finishes "Project: a console" 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: "Make it your game".

Your class

## Teach this unit as a class

Start a class from this course and its 13 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.

Start a class from this course See the demo class

More units

## Other lesson plans

Electronics basics 20 lessons, about 10 h. Embedded on the Arduino Uno 16 lessons, about 12 h. Embedded on the Raspberry Pi Pico 7 lessons, about 6 h. Build your own fight stick 5 lessons, about 4 h. Embedded on the STM32F411 6 lessons, about 6 h. C++ on a board 13 lessons, about 10 h. Digital logic and memory 4 lessons, about 4 h. Interactive devices on the Uno 9 lessons, about 8 h. From gates to a computer 23 lessons, about 16 h. Build a claw machine 8 lessons, about 6 h. Build a vending machine 6 lessons, about 5 h. Every unit All the courses as ready-made units, on the teachers page.
