Skip to content
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

add offset functions, refactor #22

Merged
merged 6 commits into from
Jan 16, 2022
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
add offset functions, refactor
  • Loading branch information
RobTillaart committed Jan 14, 2022
commit 91663b1cfc833c4fa7733e71fd8c62e69dd1731a
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,21 @@ See table below and test example how to use.
- **uint32_t lastRead()** last time when **read()** was called in milliseconds since startup.


#### Oversampling table
### Offset

The offset functions are added to calibrate the sensor against e.g. local weather station. This calibration can only be done runtime.

- **void setPressureOffset(float offset = 0)** Set an offset to calibrate the pressure.
Can also be used to get the pressure relative to e.g. 1 Atm. (set offset to -1013 HPa).
Default the value is set to 0.
- **float getPressureOffset()** returns the current pressure offset.
- **void setTemperatureOffset(float offset = 0)** Set an offset to calibrate the temperature.
Can also be used to get the temperature in degrees Kelvin. (set offset to +273.15)
Default the value is set to 0.
- **float getTemperatureOffset()** returns the current temperature offset.


### Oversampling table

(numbers from datasheet, actual time differs - todo)

Expand Down