i need to get the last entry of things speak using MIT app inventor and use it to determine if my microcontroller is turned off or not sending data to internet
3 views (last 30 days)
Show older comments
i like using thingspeak but the problem is,it always save the last data that have been sent by the arduino,so i cant detect if the arduino is truned off
btw im using esp32 ,i already established the connection between the mit app,thingspeak and esp32 .
the problem is the thingsspeak is always saving the last data ,(i also used firebase but it have the same problem)
my initial idea is to detect if the value is zero(not measuring any data) then the mit app will notify the user ,that the arduino is not connected to internet or turned off
but its not possible because it always saves the last data.
my next idea is to use mit app to determine if the last entry is not updating ,
but i dont know how i can do it, i cant also find tuturial to fix my problem xD hahah
0 Comments
Answers (1)
Christopher Stapels
on 17 Nov 2020
Does your Arduino send updates at regular intervals? You could read the last two or three data points and compare the time intervals, or compare the last posted time to the present time. You can get the present time in a MATLAB analysis using
timeNow=datetime('now');
3 Comments
Christopher Stapels
on 20 Nov 2020
When you read the time from ThingSpeak, you might have to convert the format. See datetime to see about changing the format.
[data,timestamps] = thingSpeakRead(12397)
Communities
More Answers in the ThingSpeak Community
See Also
Categories
Find more on Read Data from Channel in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!