Concept Flow - Publishing sensor data
Initialize sensor
Read sensor data
Format data for sending
Connect to network/broker
Publish data
Wait or repeat
The program starts by setting up the sensor, then reads data, formats it, connects to the network, publishes the data, and repeats.