dht22 temp change

8 years 3 months ago #3461 by alyons12
dht22 temp change was created by alyons12
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

Please Log in or Create an account to join the conversation.

8 years 3 months ago #3462 by EasyIoT
Replied by EasyIoT on topic dht22 temp change

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;
}

Please Log in or Create an account to join the conversation.

8 years 3 months ago #3463 by alyons12
Replied by alyons12 on topic dht22 temp change
im a noob to this so where does this get change

Please Log in or Create an account to join the conversation.

7 years 9 months ago #3738 by swisscore
Replied by swisscore on topic dht22 temp change
per example if you have :

value_degrees_C = getDHTtemperature();

just add a line after :

value_degrees_F = (value_degrees_C*9/5)+32

Please Log in or Create an account to join the conversation.

Time to create page: 0.433 seconds

Forum latest

  • No posts to display.