4:23 am

April 24, 2012

Hi!
I've tested sending float numbers in exponent format.I've noticed the thingy works fine for numbers that don't have whole whole values, e.g. 0.123 where number gets written as: 1.230000e-001.
But it doesn't work for numbers like 30.123, where number gets written as 3.012300e+001, becuase ThingSpeak removes the '+' sign and writes the number as "3.012300e 001", giving it wrong value of 3.0123 in charts.
Can this be changed at your side, or will I have to remove the '+' sign while producing data?
Cheers,
Jaka
Jaka,
The "+" symbol is a reserved character for URLs -- it translates into a " " space. This char would need to be URL encoded so it stays intact from end-to-end.
Here are all of the reserved chracters:
- Dollar ("$")
- Ampersand ("&")
- Plus ("+")
- Comma (",")
- Forward slash/Virgule ("/")
- Colon (":")
- Semi-colon (";")
- Equals ("=")
- Question mark ("?")
- 'At' symbol ("@")
12:53 am

April 24, 2012

True, it happenes as you mentioned. I did manage to remove the '+' sign in code, writing the number as e.g. 3.0123e01, but I still wonder why data is threated that way, after all I send data inside HTTP POST, for example:
POST /update HTTP/1.0"
Connection: close
X-THINGSPEAKAPIKEY: mykey
Host: api.thingspeak.com
Content-Length: 38
&[1]=1&[2]=1.634731e04&[3]=5.834754e04
Most Users Ever Online: 166
Currently Online:
24 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:
JadeFloralde98, mgnthe54, Zain-Ul-Abidin, wellbeingcentresuk, Vamsi, frankmehlhopModerators: cstapels: 460
Administrators: Hans: 405, lee: 457