SMART LAB · Code

ESP32 Arduino firmware

Download

The ZIP is a complete Arduino sketch folder. Unzip it, open smart_lab_mqtt.ino in Arduino IDE, and enter your Wi-Fi in secrets.h.

View on GitHub
Loading...
Loading...

Upload to the ESP32

  1. Install Arduino IDE and the esp32 board package (Boards Manager → "esp32 by Espressif").
  2. Install the libraries below from Library Manager.
  3. Copy secrets.example.h to secrets.h (the ZIP already includes it) and enter your Wi-Fi name and password. The ESP32 needs 2.4 GHz Wi-Fi.
  4. Board: ESP32 Dev Module. Upload Speed: 115200.
  5. Click Upload. Hold BOOT if it waits at "Connecting...".
  6. Open the dashboard. It shows Live within a few seconds.

Libraries

Install from Sketch → Include Library → Manage Libraries.

DHT sensor library (Adafruit) Adafruit Unified Sensor PubSubClient ArduinoJson
If no saved Wi-Fi works, the ESP32 opens the SMART-LAB-Setup hotspot (password SmartLab123). Join it and open http://192.168.4.1 to set Wi-Fi.
SMART LAB · Dashboard · Circuit · GitHub