Wireless links: nRF24 and ESP-NOW lesson plan
Board to board with no router: nRF24L01+ channels, addresses, pipes, acknowledgments and retries on Unos, then ESP-NOW peers, broadcast and unicast and a star network on ESP32-C3s, ending in a base camp on Mars.
Objectives and materials
By the end, students can
- Channels, addresses and pipes.
- Acknowledgments and retries, and ESP-NOW peers.
- Broadcast and unicast, and a star of sensors.
- A base camp on Mars.
Materials for the whole unit
- 2.4 GHz radio, nRF24L01+ x 3
- Arduino Uno R3 x 3
- ESP32-C3-DevKitM-1 x 4
- LED x 2
- Potentiometer x 2
- Pushbutton
- Resistor x 2
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.
nRF24 radios
Channels, addresses and pipes.
| Lesson | Time | What students do |
|---|---|---|
| Radios and addressesTwo Unos, two nRF24L01+ radios, no wire: a channel, a data rate and a 5-byte address that must all match, and an automatic acknowledgment that tells the sender its ping arrived. | 50 min |
|
| nRF24 pipesOne hub, two huts: six reading pipes, the rule that pipes 2 to 5 share four address bytes with pipe 1, telling senders apart by pipe, and what happens when a hut’s pipe is closed. | 50 min |
|
Materials
- 2.4 GHz radio, nRF24L01+ x 3
- Arduino Uno R3 x 3
Check for understanding
Each student finishes "nRF24 pipes" 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: "More than six".
Reliable links
Acknowledgments and retries, and ESP-NOW peers.
| Lesson | Time | What students do |
|---|---|---|
| Acks and retriesWhat the radio does when an ACK does not come: automatic retries with a delay and a count, getARC() to see how many it took, a deaf hub to watch them run out, and commands riding back on the ACKs. | 55 min |
|
| ESP-NOW peersESP32-C3s talking with no router: MAC addresses, esp_now_add_peer(), a send callback that reports the receiver’s ACK, and a receive callback with the sender’s MAC and signal strength. | 50 min |
|
Materials
- 2.4 GHz radio, nRF24L01+ x 2
- Arduino Uno R3 x 2
- ESP32-C3-DevKitM-1 x 2
- LED
- Pushbutton
- Resistor
Check for understanding
Each student finishes "ESP-NOW peers" 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: "Channels and keys".
Topology
Broadcast and unicast, and a star of sensors.
| Lesson | Time | What students do |
|---|---|---|
| Broadcast vs unicastOne sender, two receivers: unicast to one MAC, acknowledged; broadcast to FF:FF:FF:FF:FF:FF, heard by everyone and acknowledged by nobody. When each is the right tool. | 50 min |
|
| Many sensors, one hubA star network: three huts reporting to one hub over ESP-NOW, a table built by MAC as huts appear, message counts and missed sequence numbers, staggered timing, and a hut that goes silent. | 50 min |
|
Materials
- ESP32-C3-DevKitM-1 x 4
Check for understanding
Each student finishes "Many sensors, one hub" 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: "Star or mesh".
Boss project
A base camp on Mars.
| Lesson | Time | What students do |
|---|---|---|
| Boss: a base camp on MarsA habitat hub and two pods on ESP-NOW: pods unicast their oxygen levels, the hub warns of low oxygen and silent pods, and one button broadcasts a dust storm alert that every pod answers by sealing its hatch. | 65 min |
|
Materials
- ESP32-C3-DevKitM-1 x 3
- LED x 2
- Potentiometer x 2
- Pushbutton
- Resistor x 2
Check for understanding
Each student finishes "Boss: a base camp on Mars" on their own, without opening the hints. The simulator checks 8 of its 8 steps as they go.
Then ask each one to explain, in a sentence or two, the last thing it asked of them: "A stricter limit".
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.