how to write to a ThingSpeak field from an iphone
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Wade Campbell
le 18 Nov 2019
Commenté : Christopher Stapels
le 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 commentaires
Réponse acceptée
Christopher Stapels
le 18 Nov 2019
Modifié(e) : Christopher Stapels
le 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 commentaires
Plus de réponses (0)
Communautés
Plus de réponses dans ThingSpeak Community
Voir également
Catégories
En savoir plus sur ThingSpeak dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!