We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I noticed that there are read2( ) functions that take float arguments.
I tried them but I only get integer results even though the DHT11 has a resolution of 0.1°C
This shows the issue:
#include <SimpleDHT.h> void setup() { Serial.begin(115200); Serial.println(); } void loop() { float temperature = 0; float humidity = 0; SimpleDHT11 dht11(-1); int err; if (dht11.read2(14, &temperature, &humidity, NULL) != SimpleDHTErrSuccess) { Serial.print("Read DHT11 failed, err="); Serial.print(SimpleDHTErrCode(err)); //Serial.print(","); Serial.println(SimpleDHTErrDuration(err)); } Serial.print(temperature); Serial.print("°C ");Serial.print(humidity);Serial.println("%"); delay (1500); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I noticed that there are read2( ) functions that take float arguments.
I tried them but I only get integer results even though the DHT11 has a resolution of 0.1°C
This shows the issue:
The text was updated successfully, but these errors were encountered: