Due to high demand expect some shipping delays at this time, orders may not ship for 1-2 business days.

Temp reading displays C --
Moderators: adafruit_support_bill, adafruit

Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
Please be positive and constructive with your questions and comments.

Temp reading displays C --

by 94566rik on Sun Sep 20, 2015 2:22 pm

Now that I have the DHT-22 reading and feeding to my dashboard it is clear that the readings are being reported out as C. I would assume that if the readings come from the sketches are converted for C to F that the dash board would be showing temp as what is being feed to it. So will there be a dashboard selection as to C or F at some point in time or will the conversion always need to be done in the sketches?



Posts: 15
Joined: Fri Sep 11, 2015 5:40 pm

Re: Temp reading displays C --

by fmbfla on Sun Sep 20, 2015 6:44 pm

if you are converting the DHT 22 reading to *F float temp = dht.readTemperature(true); or by (float temp = dht.readTemperature();* 1.8) + 32;)and you are sending the reading like this.
(The following is a modified snippet from the IO Group_Sensor Sketch)
Code: Select all | TOGGLE FULL SIZE
    char sendbuffer[80];
    char numberbuffer[20];
// add temp feed name
    float temp = dht.readTemperature(true);
    strcpy(sendbuffer, "temp,");

  // add temp value
  dtostrf(temp, 2, 2, numberbuffer);
  strcat(sendbuffer, numberbuffer);
  // Now we can publish stuff!
  Serial.println(F("\nSending: "));

  if (! weather.publish(sendbuffer))


it will display the reading as you polled it and send it as *F
IO doesn't know what you are sending other than numbers or letters and doesn't convert any readings you send.
Check that you are sending the converted reading.
At least you have it werking......Good Job:-)


Posts: 110
Joined: Fri Jun 08, 2012 6:48 pm

Please be positive and constructive with your questions and comments.