Greetings,
My name is Stefano and I'm at my first experience with Arduino Cloud.
I am an electronics enthusiast
I'm doing the first tests with Arduino cloud.
I created another script to send data to the dashboard but noticed something wasn't working. So I created (this trivial example) with fixed variables and send them to the cloud every 10 seconds. However, it happens that the cloud receives only the first piece of data and not the others. Only after a few hours is some data updated, but not all of the data sent. Why are not all the collected data reported and why in the data export are not all those sent but only some?
changing the const long interval time from a few seconds to 15 minutes, the result does not change
Below is the test code
I don't share the file thingProperties.h because it is the one created automatically by the platform
thanks in advance
#include "thingProperties.h"
unsigned long previousMillis = 0;
const long interval = 10000;
void setup() {
// Initialize serial and wait for port to open:
Serial.begin(9600);
// This delay gives the chance to wait for a Serial Monitor without blocking if none is found
delay(1500);
// Defined in thingProperties.h
initProperties();
// Connect to Arduino IoT Cloud
ArduinoCloud.begin(ArduinoIoTPreferredConnection);
/*
The following function allows you to obtain more information
related to the state of network and IoT Cloud connection and errors
the higher number the more granular information you’ll get.
The default is 0 (only errors).
Maximum is 4
*/
setDebugMessageLevel(2);
ArduinoCloud.printDebugInfo();
}
void loop() {
unsigned long currentMillis = millis();
ArduinoCloud.update();
if (currentMillis - previousMillis >= interval) {
previousMillis = currentMillis;
acqua1 = 50;
acqua2 = 60;
acqua3 = 30;
Serial.println(acqua1);
Serial.println(acqua2);
Serial.println(acqua3);
}}