Quantcast
Channel: ThingSpeak IoT Community - Forum: Arduino
Viewing all articles
Browse latest Browse all 172

BeeWare on missing data points

$
0
0

below is my loop code, so do i need to put a delay in between each of my uploads instead of 30 seconds t the end?

 

void loop()
{
dTemp.requestTemperatures();

String uri = "/update?api_key=";
uri += APIKEY;

uri += "&field1="; //populates field 1 on ThinkSpeak Website
uri += String(dTemp.getTempF(Probe01)); //gets temperature from probe 1

uri += "&field2="; //populates field 2 on ThinkSpeak Website
uri += String(dTemp.getTempF(Probe02)); //gets temperature from probe 2

uri += "&field3="; //populates field 3 on ThinkSpeak Website
uri += String(dTemp.getTempF(Probe03)); //gets temperature from probe 3

uri += "&field4="; //populates field 4 on ThinkSpeak Website
uri += String(scale.get_units()); // get weight on scale in lbs

Ciao.println("Send data on ThingSpeak Channel");

CiaoData data = Ciao.write(CONNECTOR, SERVER_ADDR, uri);

if (!data.isEmpty()){
Ciao.println( "State: " + String (data.get(1)) );
Ciao.println( "Response: " + String (data.get(2)) );
}
else{
Ciao.println("Write Error");
}

delay(30000); // 30 seconds delay

}


Viewing all articles
Browse latest Browse all 172

Trending Articles