bme280/README.md
2025-06-11 18:42:20 +02:00

24 lines
435 B
Markdown

# BME 280 Library
Library Created for BME280 Temperature Sensor
## Example
```c
#include <bme280.h>
int main() {
stdio_init_all();
bme280_ctx* ctx = bme280_init(i2c0, 4, 5);
while(true) {
ctx->update(ctx);
printf("Temp: %.1f°C Hum: %.2f%%",
ctx->read_temp(ctx),
ctx->read_humidity(ctx));
sleep_ms(1000);
}
// Probably never reached
bme280_deinit(ctx);
}
```