Hi,
So I am sending some data up to thingspeak. And I noticed that thingspeaks averaging function sometimes didnt work. In a nutshell the data I am sending in the url is ending up with leading whitespaces. The field needs to be long enough to accomodate a value of -40.0 to 100.00
The problem only occurs when my values get down to single digits. So whereas I think I am sending
"2.0" I am actually sending " 2.0" and thingspeak interprets it as a string and doesnt average on it. As its a character array, I can't use trim. I cant for the life of me figure out how to trim whitespaces out of this?
float PanelTemp
float PoolTemp
char URL[230]="";
strcat(URL,"&field1=");
strcat(URL,dtostrf(PanelTemp,4,1,TMPVar));
strcat(URL,"&field2=");
strcat(URL,dtostrf(PoolTemp,4,1,TMPVar)); decimal place
strcat(URL,"&field3=");