Welcome, Guest
Username: Password: Remember me

TOPIC: dht22 temp change

dht22 temp change 11 months 2 weeks ago #3461

  • alyons12
  • alyons12's Avatar
  • Offline
  • New Member
  • Posts: 6
  • Karma: 0
ok so i built the easyiot cloud dht22 sensor and i cant figure out which line of code needs to be change to get the readings in Fahrenheit
The administrator has disabled public write access.

dht22 temp change 11 months 2 weeks ago #3462

  • EasyIoT
  • EasyIoT's Avatar
  • Offline
  • Administrator
  • Posts: 833
  • Thank you received: 258
  • Karma: 24
alyons12 wrote:
ok so i built the easyiot cloud dht22 sensor and i cant figure out which line of code needs to be change to get the readings in Fahrenheit

current DHT22 library uses only metric system (Celsius). convert this temperature in Fahrenheit and send this value to server. Also change unit of measure °C - > °F.

Here is function:
double Celcius2Fahrenheit(double celsius)
{
return celsius * 9 / 5 + 32;
}
The administrator has disabled public write access.

dht22 temp change 11 months 2 weeks ago #3463

  • alyons12
  • alyons12's Avatar
  • Offline
  • New Member
  • Posts: 6
  • Karma: 0
im a noob to this so where does this get change
The administrator has disabled public write access.

dht22 temp change 5 months 3 weeks ago #3738

  • swisscore
  • swisscore's Avatar
  • Offline
  • New Member
  • Posts: 16
  • Karma: 0
per example if you have :

value_degrees_C = getDHTtemperature();

just add a line after :

value_degrees_F = (value_degrees_C*9/5)+32
The administrator has disabled public write access.
Time to create page: 0.115 seconds
Powered by Kunena Forum