Skip to content

Handle si7021 returning negative humidity #28

New issue

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions firmware/emonth2.ino
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ void setup()
si7021_env data = SI7021_sensor.getHumidityAndTemperature();
Serial.print("SI7021 Started, ID: ");
Serial.println(deviceid); delay(100);
Serial.print("temp:"); Serial.print(data.celsiusHundredths/100.0); Serial.print(",humidity:"); Serial.println(data.humidityBasisPoints/100.0);
Serial.print("temp:"); Serial.print(data.celsiusHundredths/100.0); Serial.print(",humidity:"); Serial.println(int(data.humidityBasisPoints)/100.0);
delay(100);
}
else
Expand Down Expand Up @@ -493,7 +493,7 @@ void loop()
#endif
si7021_env data = SI7021_sensor.getHumidityAndTemperature();
emonth.temp = (data.celsiusHundredths*0.1);
emonth.humidity = (data.humidityBasisPoints*0.1);
emonth.humidity = (int(data.humidityBasisPoints)*0.1);
#ifndef ATTINY
power_twi_disable();
#endif
Expand Down