mirror of
https://github.com/adafruit/DHT-sensor-library.git
synced 2023-10-23 22:20:38 +03:00
Resolve #24 by adding convert F to C function.
This commit is contained in:
parent
f2a48d6267
commit
7f7425f11e
4
DHT.cpp
4
DHT.cpp
@ -53,6 +53,10 @@ float DHT::convertCtoF(float c) {
|
||||
return c * 9 / 5 + 32;
|
||||
}
|
||||
|
||||
float DHT::convertFtoC(float f) {
|
||||
return (f - 32) * 5 / 9;
|
||||
}
|
||||
|
||||
float DHT::readHumidity(void) {
|
||||
float f;
|
||||
if (read()) {
|
||||
|
Loading…
Reference in New Issue
Block a user