# Lesson 01 — LED Ring Galaxy Moment

## Hook

Teacher turns off the classroom lights and says: “Go.”

Students power their ESPrinkler32 EDU boards. The LED rings become a tiny galaxy. Some work perfectly, some are rainbow, some are dark, and one is probably full white because future engineers must meet current draw emotionally.

## Learning objectives

Students will understand:

- 5V power vs 3.3V logic
- Shared ground
- DIN vs DOUT directionality
- Addressable LEDs and pixel indexing
- RGB color values
- Basic HTTP/API control
- Hardware/software debugging discipline

## Materials

- ESPrinkler32 EDU board or ESP32 demo board
- Addressable LED ring
- 5V supply or approved USB power path
- Jumper wires
- Pre-flashed starter firmware
- Optional: multimeter

## Classroom safety

- Use LED/demo-load mode, not live irrigation wiring.
- No mains wiring.
- Use current-limited classroom-safe supplies.
- Teacher verifies power wiring before the first full-class lights-off test.

## Wiring checklist

- LED 5V -> board 5V
- LED GND -> board GND
- LED DIN -> configured data pin
- Confirm DIN, not DOUT
- Confirm brightness limit before demo

## Demo API ideas

- `/api/ledring?demo=rainbow`
- `/api/ledring?pixel=0&color=00ff00`
- `/api/ledring?zone=1&state=on`
- `/api/ledring?brightness=40`

## Debugging liturgy

No student may say “it doesn’t work” until checking:

1. Is the board powered?
2. Is the LED ring powered?
3. Is ground shared?
4. Is data connected to DIN?
5. Is brightness non-zero?
6. Is the data pin correct in firmware?
7. Is the first LED damaged?
8. Did software return an error?

## Teacher line

“Tonight you’re not just making lights blink. You’re building a machine that tells humans what it’s thinking.”

## Extension ideas

- Map zones to LED segments.
- Make a countdown arc for runtime remaining.
- Make red mean fault, blue mean skipped by weather, green mean watering allowed.
- Let students call endpoints from browser, curl, or a tiny web form.
