Program Flow

Overview:

The whole application is event driven.

At bootup, two timers are started. One ticking every second and the other every 15s.

Steps:

Step 1: Connect to WiFi.

For this, the esp32 starts and AP (ssid=powersense, password=password). Connect to the AP and Sign In to the network. Give the WIFI credentials and done.

Step 2: Connect to MQTT.

After WiFi is successfully connected, the device connects to the nodesense.baseapp.com through MQTT.

Step 3: Poll ATM90E26 every 15s via SPI and get the data. The readings are pushed to nodesense.baseapp.com.


Revision #1
Created 31 December 2021 08:12:11 by Ashish
Updated 31 December 2021 08:31:42 by Ashish