bme280-device

wayland/bme280-barometer/bme280-device

Create BME280 device. See datasheet (https://cdn-learn.adafruit.com/assets/assets/000/115/588/original/bst-bme280-ds002.pdf) for recommended oversampling and filter settings for specific use cases.
bme280-device
@/bme280-device
Create BME280 device. See datasheet (https://cdn-learn.adafruit.com/assets/assets/000/115/588/original/bst-bme280-ds002.pdf) for recommended oversampling and filter settings for specific use cases.
bme280-device
DEV
DEV@/bme280-device
A BME280 device.
To use the node in your project you should have the wayland/bme280-barometer library installed. Use the “File → Add Library” menu item in XOD IDE if you don’t have it yet. See Using libraries for more info.

C++ implementation

// Tell XOD where it could download the library:
#pragma XOD require "https://github.com/adafruit/Adafruit_Sensor"
#pragma XOD require "https://github.com/adafruit/Adafruit_BME280_Library"
#pragma XOD require "https://github.com/adafruit/Adafruit_BusIO"

//Include C++ libraries
#include <Adafruit_Sensor.h>
#include <Adafruit_BME280.h>

node {
    meta {
        // Define our custom type as a pointer on the class instance.
        using Type = Adafruit_BME280*;
    }

    Adafruit_BME280 sensor = Adafruit_BME280();
    
    void evaluate(Context ctx) {
        // It should be evaluated only once on the first (setup) transaction
        if (!isSettingUp())
            return;
        emitValue<output_DEV>(ctx, &sensor);
    }
}