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

Studvio on Channel update

$
0
0

Hi all, I'm new around here, and I am a free user (i.e. 15 secs. delay between updates)

According to https://thingspeak.com/pages/license_faq,

"A message is defined as a write of up to 8 fields of data to a ThingSpeak channel"

However, using the following Arduino lines of code

ThingSpeak.begin(ThingSpeakClient);
ThingSpeak.writeField(myChannelNumber, 2, 0, myWriteAPIKey);
ThingSpeak.writeField(myChannelNumber, 4, 0, myWriteAPIKey);
ThingSpeakClient.stop();

will only result in updating of field 2 only, and not field 4 as well.

Adding a 15 secs. delay between line 2 and 3 in the code above (delay(15000);) will result in both fields being updated when I run the code.

Could anyone shed some light into this matter please? Thank you.

ThingSpeak.begin(ThingSpeakClient);
ThingSpeak.setField(2, 0);
ThingSpeak.setField(4, 0);
ThingSpeak.writeFields(myChannelNumber, myWriteAPIKey);
ThingSpeakClient.stop();

 

Later edit: Solved, thanks!Laugh


Viewing all articles
Browse latest Browse all 172

Trending Articles