6:00 pm
June 17, 2020

hi, I read temperature data from my channel with this code;
long temp = ThingSpeak.readLongField(counterChannelNumber, FieldNumber1, myCounterReadAPIKey);
The result in my chart of n the portal is “16,7” but the result from my code is “16” although I expect from “readLongField” the “long” version and not the integer version.
What and where does something go wrong?
5:07 pm
June 17, 2020

Thanks Vinod, you triggered my thoughts and I found another function.
I am using ThingSpeak.readFloatField now and get “16.70” as result.
Documentation:
https://github.com/mathworks/thingspeak-arduino/blob/master/README.md
To get rid of the trailing digit I used this code;
tempKelderStr.concat(tempKelder); // float to string
tempKelderStr.remove(tempKelderStr.length() - 1, 1); //remove trailing digit
Most Users Ever Online: 166
Currently Online:
31 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
rw950431: 272
Vinod: 240
piajola: 95
turgo: 70
vespapierre: 63
Adarsh_Murthy: 62
Member Stats:
Guest Posters: 1
Members: 8665
Moderators: 1
Admins: 2
Forum Stats:
Groups: 3
Forums: 14
Topics: 1600
Posts: 5760
Newest Members:
huldacormier, bogart, estebanmateo93, mikewrite, onlinebusiness, winzy99Moderators: cstapels: 460
Administrators: Hans: 405, lee: 457