ESP32 & analog: the world is more than on and off
420-302-VA · WEEK 8 · FALL 2026

Stage 6 of 6 · Logistics, evidence, next steps

Lab & hand-in

The clock for a dense afternoon: a new board flashed, a sensor calibrated, an actuator dimmed, a class composed, and a brief opened. The evidence list grows one scientific item this week, your bench's calibration anchors, because numbers you measured are now part of your system's documentation.

The two hours

MinutesYou doCheckpoint before moving on
0–10Station up; ESP32 unboxed; data cable in; port visible (driver sorted if not); ~/iot/week8 repo with .gitignore.Thonny sees a serial port.
10–25Flash MicroPython; REPL answers; onboard blink from the REPL, then as a script; main.py autostart proven on a power source.The board blinks with no laptop attached.
25–50USB unplugged; divider wired and traced; live-readings loop; hand and flashlight test; dark and bright anchors recorded; light_pct() clamping.Calibrated percent moves sensibly, 0 to 100, no excursions.
50–70External LED on GPIO25; duty experiments; sweep; the follower and its inverse.Both follower senses demonstrated; duty-to-percent conversion done once by hand.
70–100The ladder, spec first, swapping roles: hysteresis night light, smooth follower, LightNode.At least two rungs verified; the class drives from the REPL.
100–110A2 first pass, together, brief open on Omnivox.Both partners state deliverables and dates from memory.
110–120Evidence, exit ticket, clean shutdown, pack.Kit packed, ESP32 included; station restored.

Working as a pair

Navigator and driver as established, with a two-machine clause: this week the laptop-and-ESP32 bench is the main stage and the Pi may rest, but the repository does not, every script's canonical copy is committed from whichever machine edits it, and the board only ever receives uploads of committed code. The navigator owns the spec and, new this week, the numbers: calibration anchors, thresholds and duty values are read out loud and written down when measured, not reconstructed later. Swap each rung; both partners flash, both wire, both calibrate, because A2 assumes two people who can each run the whole bench.

What to hand in

ItemHow to produce itShows that
Repository URLPaste into the Omnivox formblink.py, the readings loop, follower, ladder rungs with specs, lightnode.py, docs/ with sketches and verification tables, commits from both partners
docs/calibration.mdMarkdown, two numbers and their storyYour bench's dark and bright anchors, how each was produced, and the n chosen for averaging: configuration, documented
A2 verification table (draft)docs/ of the A2 repo, from the second passThe brief has been worked, not skimmed; questions logged and sent
station.txtTyped in nano or ThonnyStation number, board markings, bridge chip if known, both names, who navigated which rung, exit-ticket answers if asked

Counts as completion of in-class work. The A2 table's final, demonstrated version is due with A2 itself in Week 10, per the brief.

Exit ticket

  1. Name the one input capability the ESP32 has that the Pi lacks, and the architecture role each machine plays because of it.
  2. A 12-bit ADC on 3.3 V: step size, shown with the formula.
  3. In our divider, which way does the GPIO34 voltage move when a cloud passes, and why?
  4. Why does pwm.duty_u16(adc.read_u16()) need no scaling?
  5. Open loop versus closed loop, one sentence each, and which one A2 requires.

Packing up

Homework

  • A2 second pass, the hour it deserves: verification table complete and committed, questions sent this week, per the reading protocol. This is the week's one non-negotiable.
  • Finish the ladder at home if rungs remain; the whole bench travels in your kit, and the home setup is just a laptop and the cable.
  • One REPL experiment of your own: anything the quick reference tempts you with, touch pins, the internal temperature sensor, a second PWM channel. Fifteen minutes of play; note what you tried in your journal, the project milestones will want the habit alive.
  • Paper drills continue: one divider calculation and one duty-to-percent conversion, cold, beside the trace-a-day habit. The final exam in Week 13 draws on this material too.

Week 9: the boards talk

Week 9 · Monday, November 2

MQTT: publish and subscribe

The node's telemetry line leaves the USB cable: a Mosquitto broker on the Pi (port 1883), the ESP32 joining Wi-Fi and publishing, the Pi subscribing with paho-mqtt, and topics designed the way rung 4 designed message lines. Both boards on the bench, the dashed arrow in the architecture diagram turning solid. Bring the full kit.

Also that week

Dates worth circling

The administrative course-drop deadline (AE) falls Tuesday, November 3; anyone weighing it should talk to the teacher before then, not after. A2 continues through the week per the three-week plan, and D1, the project's first milestone, is two weeks out in Week 11.