Skip to content

Latest commit

 

History

History
40 lines (29 loc) · 1.3 KB

Readme.md

File metadata and controls

40 lines (29 loc) · 1.3 KB

pico-spl06-001

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.

Getting Started

  1. Clone this repo
  2. Change config to your setting in example
  3. Build with your computer
  4. Write generated uf2 file to your board
  5. Check serial monitor!
  6. Integrate into your project! Don't forget to target_link_libraries(<target> pico-spl06-001)in your CMakeLists.txt!

Quick Steps

  1. Set config. "rate" means measure per second. spl06_config_t config = {<address>, <i2c0 or i2c1>, <mode>, {<pressure rate>, <pressure oversampling>}, {<temperature rate>, <temperature oversampling>}};
  2. Preapare a variable for coefficients, pressure and temperature. spl06_coef_t coef; float prs, temp;
  3. Initialize sensor. spl06_init();
  4. 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

ToDo

  • Support Command Mode

License

BSD 3-Clause License