Sie verfolgen jetzt diesen Kanal
- Sie werden Aktualisierungen in Ihrem Inhalts-Feed sehen.
- Je nach Ihren Benachrichtigungseinstellungen können Sie auch E-Mails erhalten.
Sie verfolgen jetzt dieses Thema
- Sie werden Aktualisierungen in Ihrem Inhalts-Feed sehen.
- Je nach Ihren Benachrichtigungseinstellungen können Sie auch E-Mails erhalten.
writing a string to a field
I find this is possible to do, but how does one read the data back.
Dieses Thema anheften?
Mit dieser Aktion wird dieser Beitrag angeheftet, sodass er ganz oben auf den zuletzt verwendeten Diskussionsseiten in der Community erscheint.
Dieses Thema endgültig löschen?
Dies kann nicht rückgängig gemacht werden.
Direkter Link zu dieser Antwort:
Error Occurred
Unable to complete the action because of changes made to the page. Reload the page to see its updated state.
Diese Antwort endgültig löschen?
Dies kann nicht rückgängig gemacht werden.
Direkter Link zu dieser Antwort:
There are several ways to read the data back, detailed on this page about reading data . The three ways are with the REST API, MATLAB, and MQTT API.
Diese Antwort endgültig löschen?
Dies kann nicht rückgängig gemacht werden.
Direkter Link zu dieser Antwort:
ok, I'll have to learn REST API. I mostly use stuff like CodeRead = ThingSpeak.readLongField(myChannelNumber, RequestField, myReadAPIKey); with Arduino.
This is a real cool product by the way!
Diese Antwort endgültig löschen?
Dies kann nicht rückgängig gemacht werden.
Direkter Link zu dieser Antwort:
Thanks, I like it a lot too! The ThingSpeak Arduino library uses the REST API behind the scenes, as do reads from MATLAB. Are you trying to read data from desktop MATLAB or from MATLAB in ThingSpeak or from a device? I really recommend the getting started tutorial in the doc. It goes over a lot of ThingSpeak functionality.
Diese Antwort endgültig löschen?
Dies kann nicht rückgängig gemacht werden.
Direkter Link zu dieser Antwort:
So I've been using rest api all along just didn't know it had that particular name. Jargon has its own Moore's law. lol
Diese Antwort endgültig löschen?
Dies kann nicht rückgängig gemacht werden.
Direkter Link zu dieser Antwort:
I have a bunch of esp8266 controlling lights and related, and each device sends a number to thingspeak when it turns something on or off, then I can look at the numbers in the graph and see what is going on, I also have devices read the numbers and perform actions based on what is requested. So, a request field and and an action field. Then I thought why not use a field to write strings to for certain abnormal things going on. I found I could do that, but they never show in the typical graphs of the field, but I found them when downloading the channel. So I guess my question is, if I write a string, how do I get to see what is there in the graphs you get when you look at any other field of the channel.
Diese Antwort endgültig löschen?
Dies kann nicht rückgängig gemacht werden.
Direkter Link zu dieser Antwort:
Thanks for clarifying your question. I can think of at least two ways to show strings. One is to use the status field. In your channel settings view, check "Show Status" and the last value posted to the status field will show on your channel view. To write status, add &status= to your rest call, or use the ThingSpeak.setstatus call in the Arduino library. The second method is a custom MATLAB visualization that will interpret and display the strings. You can use the text or annotate methods to put words on a figure. The standard field plots will only show numbers.
Diese Antwort endgültig löschen?
Dies kann nicht rückgängig gemacht werden.
Direkter Link zu dieser Antwort:
"Show Status" was already checked. Is there another field besides the 8? I notice that under add visualizations there is a status field. Mine shows nothing. So I guess to date nothing has been recorded there. I will look up the ThingSpeak.setstatus in the cpp file. Thanks!
Diese Antwort endgültig löschen?
Dies kann nicht rückgängig gemacht werden.
Direkter Link zu dieser Antwort:
So, is show status another place to put a message about say, some field you just updated? Interesting. I'll have to play around with that. Also, it has something about a twitter tweet, will this also send message to that? I have never used twitter, but that might fun to play with.
/* Function: setStatus Summary: Set the status field of a multi-field update. Parameters: status - String to write (UTF8). ThingSpeak limits this to 255 bytes. Returns: Code of 200 if successful. Code of -101 if string is too long (> 255 bytes) Notes: To record a status message on a write, call setStatus() then call writeFields(). Use status to provide additonal details when writing a channel update. Additonally, status can be used by the ThingTweet App to send a message to Twitter. */ int setStatus(String status) { #ifdef PRINT_DEBUG_MESSAGES Serial.print("ts::setStatus(status: "); Serial.print(status); Serial.println("\")"); #endif // Max # bytes for ThingSpeak field is 255 (UTF-8) if(status.length() > FIELDLENGTH_MAX) return ERR_OUT_OF_RANGE; this->nextWriteStatus = status; return OK_SUCCESS; };
Beiträge dieses Autors
-
Discussion
Tags
Noch keine Tags eingegeben.
Website auswählen
Wählen Sie eine Website aus, um übersetzte Inhalte (sofern verfügbar) sowie lokale Veranstaltungen und Angebote anzuzeigen. Auf der Grundlage Ihres Standorts empfehlen wir Ihnen die folgende Auswahl: .
Sie können auch eine Website aus der folgenden Liste auswählen:
So erhalten Sie die bestmögliche Leistung auf der Website
Wählen Sie für die bestmögliche Website-Leistung die Website für China (auf Chinesisch oder Englisch). Andere landesspezifische Websites von MathWorks sind für Besuche von Ihrem Standort aus nicht optimiert.
Amerika
- América Latina (Español)
- Canada (English)
- United States (English)
Europa
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)