Quantcast
Channel: ThingSpeak IoT Community - All Forums
Viewing all articles
Browse latest Browse all 1833

cstapels on Retrieve value 30 writes ago

$
0
0

if you know the entry ID of the last entry, you can subtract 30 and get it like this

GET https://api.thingspeak.com/channels/CHANNEL_NUMBER/fields/FIELD_NUMBER/"+String(entryID-30)+".json";

If you dont know the entry id of the last entry: read the last  entry, the JSON object will return the entry id for you

GET https://api.thingspeak.com/channels/CHANNEL_NUMBER/feeds/last.json

 

The return format is shown here.  I use <ArduinoJson.h> to parse it, there is a bit of overhead with it, but not too bad.


Viewing all articles
Browse latest Browse all 1833

Trending Articles