-
Notifications
You must be signed in to change notification settings - Fork 39
Added temperature offset #32
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,8 +10,13 @@ | |
# change this to match the location's pressure (hPa) at sea level | ||
bme680.sea_level_pressure = 1013.25 | ||
|
||
# You will usually have to add an offset to account for the temperature of | ||
# the sensor. This is usually around 5 degrees but varies by use. Use a | ||
# separate temperature sensor to calibrate this one. | ||
temperature_offset = -5 | ||
|
||
while True: | ||
print("\nTemperature: %0.1f C" % bme680.temperature) | ||
print("\nTemperature: %0.1f C" % bme680.temperature + temperature_offset) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will throw. Parentheses should be surrounding the calculation.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @houmark Good catch! If you could file an issue, it would be greatly appreciated. Or, if you're comfortable submitting a PR, that would be amazing too! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was actually fixed in a this commit, so nothing more to do here ;) |
||
print("Gas: %d ohm" % bme680.gas) | ||
print("Humidity: %0.1f %%" % bme680.humidity) | ||
print("Pressure: %0.3f hPa" % bme680.pressure) | ||
|
Uh oh!
There was an error while loading. Please reload this page.