The objective is to establish a data transmission system whereby sensor data collected via an ESP32 microcontroller programmed through the Arduino IDE is transmitted to an IoT cloud platform for subsequent visualization in graph format. The process entails retrieving sensor readings, incorporating timestamps for data integrity, and configuring a graphical representation wherein the sensor values are plotted against their corresponding timestamps. This endeavor necessitates the seamless integration of hardware and software components, including the Arduino IDE, ESP32 microcontroller, sensor interface, IoT cloud platform, and graph plotting functionality, to achieve the desired outcome of real-time data visualization for analytical purposes.
Here is my code:
//Lesson1
#include <Esp32WifiManager.h>
const int relay = 5;
int sensor_pin = 4;
int output_value;
int led = 18;
void setup() {
Serial.begin(115200);
Serial.println("Reading From the Sensor ...");
pinMode(led, OUTPUT);
pinMode(relay, OUTPUT);
digitalWrite(led, HIGH);
digitalWrite(relay, LOW);
delay(500);
digitalWrite(relay, HIGH);
digitalWrite(led, LOW);
}
void loop() {
digitalWrite(relay, LOW);
output_value = analogRead(sensor_pin);
output_value = map(output_value, 550, 0, 0, 100);
Serial.print("Moisture : ");
Serial.print(output_value);
Serial.println("%");
delay(50);
while(output_value <= -100) {
digitalWrite(led, HIGH);
output_value = analogRead(sensor_pin);
output_value = map(output_value, 550, 0, 0, 100);
Serial.print(output_value);
digitalWrite(relay, HIGH);
Serial.println("Current Flowing");
delay(50);
}
digitalWrite(led, LOW);
digitalWrite(relay, LOW);
Serial.println("Current not Flowing");
}
May I inquire if you are familiar with any Internet of Things (IoT) platforms that are compatible with the described hardware configuration involving the Arduino IDE and the ESP32 microcontroller? The query seeks information regarding platforms that seamlessly integrate with the specified hardware setup to facilitate data transmission, storage, analysis, and visualization of sensor data accompanied by timestamps.