thingspeak values for real time data of my IOT weather station are displaying as zero.
1 view (last 30 days)
Show older comments
I am making an IOT based online and lcd based off;ine weather station. I have uploaded a code to my arduino and ait works absolutely fine displaying all values on the lcd. but when i am using my esp8266 the code gets uploaded but the values on the charts in thingspeak is all zero even after 90 entries.
3 Comments
Christopher Stapels
on 17 May 2023
Edited: Christopher Stapels
on 17 May 2023
Can you edit the code just to show the parts where you communicate to ThingSpeak? Also there is a code button in the editor that will make it wasier to read the code.Would you consider using that as well, pelase?
Answers (1)
Christopher Stapels
on 18 May 2023
In the upload() section, I would suggest you try hard coding values instead of value_1, etc. Like this
ThingSpeak.writeField(Channel_ID, Field_Number_1, 321, myWriteAPIKey);
Then see if that number shows up in ThingSpeak correctly. If so, then your variables arent being set correctly.
Also, you dont have to publish each field individually. You will get null values in all the other fields if you do.
Then you will publish all values in a single write action, and they will all have the same timestamp. Your field charts will look much nicer and you will save a lot of writing time during which your processor could take a small nap.
And can you please edit the code above just to show the parts where you interact with thingspeak.
3 Comments
Christopher Stapels
on 18 May 2023
Thanks! Were you able to try hard coding the values in the write and writing multiple fields in one call?
Communities
More Answers in the ThingSpeak Community
See Also
Categories
Find more on Write Data to Channel in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!