API for the PI Pico to read out the bme280 sensor.
Go to file
2025-06-11 18:42:20 +02:00
include Initial Commit 2025-06-11 18:42:20 +02:00
source Initial Commit 2025-06-11 18:42:20 +02:00
.gitignore Initial Commit 2025-06-11 18:42:20 +02:00
CMakeLists.txt Initial Commit 2025-06-11 18:42:20 +02:00
README.md Initial Commit 2025-06-11 18:42:20 +02:00

BME 280 Library

Library Created for BME280 Temperature Sensor

Example

#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);
}