Environmental monitoring with ESP32, sensors, Wi-Fi, and MQTT
Use ESP32 microcontrollers with a range of sensors to monitor the environment. Data is sent over Wi-Fi via MQTT to the shared Node-RED dashboard, where it can be visualised and analysed alongside data from other strands.
From blinking an LED to a full weather station.
Set up MicroPython on the ESP32. Blink an LED. Read the built-in hall sensor. Print values to the serial console. Get comfortable with the workflow.
Wire up a DHT22 sensor. Read temperature and humidity. Display values on an OLED screen. Understand analogue vs digital sensors.
Connect the ESP32 to the intranet Wi-Fi. Publish sensor data to an MQTT broker on the Raspberry Pi. Subscribe to topics from Node-RED.
Create Node-RED flows that subscribe to your MQTT topics. Build dashboard widgets: gauges for temperature, charts for humidity over time, alerts for thresholds.
Combine DHT22, BMP280, and LDR into a complete weather station. Log data over time. Compare indoor vs outdoor readings. Calculate heat index.
Add a soil moisture sensor. Monitor a plant's environment: light, temperature, soil moisture. Set up dashboard alerts when the plant needs watering.
Before you hand over to the next group: