how to write to a ThingSpeak field from an iphone
3 views (last 30 days)
Show older comments
Wade Campbell
on 18 Nov 2019
Commented: Christopher Stapels
on 21 Nov 2019
I have an Arduino project that stores information in ThingSpeak. Some of the fields in a TS channel are "control parameters" used in the project (e.g., how long to wait before checking a sensor). The Arduino reads these control parameters every x minutes.
I'd like to be able to change these parameters (i.e., write a different value to a TS field) from my iPhone. It seems that I should be able to have a one line browser url that would accomplish this, but all the solutions I've found seem to require something more complicated (e.g., https://www.mathworks.com/help/thingspeak/write-data.html?s_tid=CRUX_lftnav).
Is there an easy way to do this?
0 Comments
Accepted Answer
Christopher Stapels
on 18 Nov 2019
Edited: Christopher Stapels
on 21 Nov 2019
If I understand what you would like to do, the REST API is exactly what you need.
Click the API keys tab on your channel view and copy the first GET request. It should have the form
but with a different API key. This url will update your channel.
You can also update multiple fields simultaneously by appending &fieldx=yy to the end of the request.
Is that what you wanted?
IF your set of parameters is common, you could embed the links in a web page and then open the page on your phone to change the values. For example if one value was either 10 or 5 and it changed back and forth, you could just set the links permantly in the page for thos two values, then just click the links when you wanted to change the values.
2 Comments
More Answers (0)
Communities
More Answers in the ThingSpeak Community
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!