Last active
May 5, 2025 00:01
-
-
Save mcavalcantib/a58c1e18824f7f1bcf02526bb202b6cc to your computer and use it in GitHub Desktop.
Absolute humidity calculation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "math.h" | |
| #define e 2.718281828459045235360287471352 | |
| float calculateAbsoluteHumidity(float hum, float temp) | |
| { | |
| float UA = ((6.112 * (pow(e, ((17.67 * temp) / (temp + 243.5)))) * hum * 2.1674) / (273.15 + temp)); | |
| return UA; | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Absolute humidity calculation formula to use in arduino or esp32 projects.
E.g.: Read the temperature and relative humidity from DHT11/DHT22 sensor and pass to this function, so you have the relative and absolute humidity and the temperature, wich are the paraments to know how well your dryer is working.