mirror of
https://github.com/adafruit/DHT-sensor-library.git
synced 2025-08-02 18:34:28 +02:00
Resolve #24 by adding convert F to C function.
This commit is contained in:
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()) {
|
||||
|
Reference in New Issue
Block a user