Hello Arduino Forum ,
I need guidance for or draft Program of ESP32 to take data through serial Communication (UART2) and transfer the serially taken data to Arduino Cloud.
Which steps i need to follow while receiving the data into ArduinoCloud.
Hi @ajit07. Since you didn't provide any details about the form of the data that will be received via UART2, it is not possible to provide any specific guidance.
As for general guidance, it is quite simple:
- Create an Arduino Cloud Thing by following the instructions in this guide: https://docs.arduino.cc/arduino-cloud/guides/arduino-c/
- Add an Arduino Cloud Variable to your Thing with a type that is appropriate for the data that will be received from UART2.
- Add code to the Thing sketch that parses the data received from UART2 and stores it in the Cloud Variable.
For example, if the Cloud Variable is named myVariable and the received data is in the form of textual representation of integers, you would put this code in the loop function of the Thing sketch's .ino file:
if(Serial2.available()) {
myVariable = Serial2.parseInt();
}
You can create an Arduino Cloud dashboard and add a Widget of an appropriate type connected to your variable. That widget will then display the data the Thing is receiving from UART2.