Skip to content

BME280

This leaf controls a BME280 temperature/humidity/pressure sensor.

It connects to the sensor through I2C protocol and scans its parameters at predefined rate.

Parameters

See API Docs

Example

    gn_leaf_handle_t env_thp = gn_leaf_create(node, BME280,
            gn_bme280_config, 8192);
    gn_leaf_param_init_double(env_thp, GN_BME280_PARAM_SDA, 21);
    gn_leaf_param_init_double(env_thp, GN_BME280_PARAM_SCL, 22);
    gn_leaf_param_init_bool(env_thp, GN_BME280_PARAM_ACTIVE, true);
    gn_leaf_param_init_double(env_thp, GN_BME280_PARAM_UPDATE_TIME_SEC, 10);