LEDWorkshop

Sensor logic lab · state and thresholds

Why the LED remembers

The command turns ON at 28°C or above and OFF at 26°C or below. Between those thresholds, it retains the last command. The command is what the program requests—not an observation that the physical light is on.

01

Predict before inspecting

Follow the input sequence

Once the temperature reaches the upper boundary, a reading between the boundaries keeps the indicator on.

Chosen input sequence

  1. Step 125°C
  2. Step 228°C
  3. Step 327°C
  4. Step 426°C
  5. Step 527°C
Predict the LED command

What is the LED command at step 3, after 28 °C and then 27 °C?

Continue on the real starter

Edit the thresholds, then restart

Edit HIGH_C and LOW_C near the top of code.py, as the build guide describes. Saving restarts CircuitPython and clears retained state. The defaults in indicator.py are overridden by those constants. A forced ON/OFF check is useful for wiring, but it is different from testing whether a between-threshold sample retains the previous command.