03-23-2022 12:22 AM
Is there any guide/tutorial on how to use this api https://github.com/BoschSensortec/BMP2-Sensor-API ?
I am currently using the linux module to interface with it for a web thermostat but i would like to integrate the code into my app so i can support more and more sensors as the time goes on.
Solved! Go to Solution.
03-23-2022 02:36 AM
Hi Iuliean,
Github example code demostrate how to call BMP280 sensor API, https://github.com/BoschSensortec/BMP280_driver/tree/master/examples
According to your hardware connection interface I2C or SPI, implement the following interfaces.
void delay_ms(uint32_t period_ms);
int8_t i2c_reg_write(uint8_t i2c_addr, uint8_t reg_addr, uint8_t *reg_data, uint16_t length);
int8_t i2c_reg_read(uint8_t i2c_addr, uint8_t reg_addr, uint8_t *reg_data, uint16_t length);
int8_t spi_reg_write(uint8_t cs, uint8_t reg_addr, uint8_t *reg_data, uint16_t length);
int8_t spi_reg_read(uint8_t cs, uint8_t reg_addr, uint8_t *reg_data, uint16_t length);
03-23-2022 12:31 PM
thanks
03-24-2022 03:03 AM
Welcome, Iuliean.