Setting up a new ESP32 Node
This page describes how to set up a new ESP32 node for the peer-to-peer sensor network lab setup.
First, ensure that you have the Micropython firmware installed on the ESP32.
Adding the required files
- Connect the ESP32 to your computer via USB.
- Copy the required files to the ESP32. You can use the
mpremote
command or for example the Arduino Labs for Micropython Software. - The required files are:
main.py
: The main script that runs on the ESP32. Choose one from the udp or espnow directory.boot.py
: Script to read data from the dust sensor.lib/
: Library required for the dust sensor.util/
: Additional utility functions.
- Edit the
config.py
file to set a unique hostname and credentials for the network connection. Copy this file to the root directory of the ESP32.