A library to use Goertek's SPL06-001 Pressure & Temperature Sensor with RP2040 boards (such as Raspberry Pi Pico) using Raspberry Pi Pico C/C++ SDK.
This library currently support only Background mode for continuous measurements.
- Clone this repo
- Change config to your setting in example
- Build with your computer
- Write generated uf2 file to your board
- Check serial monitor!
- Integrate into your project!
Don't forget to
target_link_libraries(<target> pico-spl06-001)
in your CMakeLists.txt!
- Set config. "rate" means measure per second.
spl06_config_t config = {<address>, <i2c0 or i2c1>, <mode>, {<pressure rate>, <pressure oversampling>}, {<temperature rate>, <temperature oversampling>}};
- Preapare a variable for coefficients, pressure and temperature.
spl06_coef_t coef;
float prs, temp;
- Initialize sensor.
spl06_init();
- Read pressure and temperature.
spl06_read_press_cal(&config, &coef, &prs);
spl06_read_temp_cal(&config, &coef, &temp);
For details, refer pico-spl06-001.h(include quick reference) and Datasheet
- Support Command Mode
BSD 3-Clause License