Interactive lab: ESP32 sensor dashboard
A working browser simulation of the kind of lab a commissioned course would ship: sensors, a threshold alert, an output, an event log, runnable code, and a check for understanding. No hardware is connected and none is claimed.
Browser simulation — no real ESP32 or sensor is connected. Move the sliders to see how a threshold alert, an LED output, and an event log behave in an IoT dashboard.
Sensor dashboard simulator
●Normal: temperature within threshold
Event log
- Simulation started. No hardware connected — readings are simulated in your browser.
Live waveform — simulated history
Violet = temperature (10–45 °C), mint = humidity (10–95%), amber dots at the top = LED on at that sample. Samples are taken every 1.5 seconds from the simulated slider values above — still a browser simulation, not a live device.
Samples: 1 · Latest: 24.5 °C, 55% humidity, LED OFF
The code behind the dashboard (MicroPython)
# ESP32 sensor dashboard (MicroPython) — simulation logic
# On real hardware, replace read_sensor() with a DHT22 driver.
import time
THRESHOLD_C = 30.0
led_on = False
def read_sensor():
# Replace with: dht.measure(); return dht.temperature(), dht.humidity()
return 24.5, 55.0
while True:
temp_c, humidity = read_sensor()
alert = temp_c > THRESHOLD_C
print(f"Temp: {temp_c:.1f} C Humidity: {humidity:.0f}% Alert: {alert}")
time.sleep(2)On real hardware, only the sensor-reading function changes; the threshold, LED, and logging logic stay the same. That is the point of the lab: one mental model, from simulation to board.