User View
To describe our process for data flow within our system, we have two flowcharts, one for user viewing and one for user input. The flowchart for user viewing data is straightforward and linear, the sensors in the system will collect data which will travel to the Adafruit IO interface through the MQTT and be available for viewing. The data collection is happening continuously so the user will have access to updated data on their tank parameters.
User Input
The flowchart for user input contains two decisions. First, if the user inputs any parameters, the input will travel from the interface to the ESP32 via the MQTT. If there is no input, then we stay at the starting point and wait. At the ESP32, the appropriate relay module activates the device to change the tank parameters. The sensors check the parameters as they change and decide when the desired parameter has been reached, leading to the relays deactivating the device. At this point, the process returns to the start and awaits user input again.
WiFi Set Up
Relay and Feeds Set Up
To establish the function of each relay, the following figure defines when they will be activated by a high signal or deactivated by a low signal. For example, the handleMessageLight() function subscribes to data from the ‘Light’ data feed from Adafruit IO. Depending on if the user toggled the lights on or off, the feed sends HIGH or LOW, which will indicate to relay1 to turn the lights on or off. The handleMessageTemp() function receives data from the ‘Set Temperature’ feed, which is set by user input. If the temperature detected by dht2 on the warm side of the reptile tank is less than the user input or a set minimum of 70 F, relay3 will be activated to turn on the heat lamp.
Relay and Feeds Set Up
Toggle block for Lights
Slider Blocks for Temperature & Humidity
Line chart to display data from two DHT 22
Indicator for Water Level
30 data points / min
ADAFRUIT IO - REPTILE SMART TANK DASHBOARD