scd4x-device

wayland/scd4x-co2-rh-temp/scd4x-device

Create an SCD4X device.
scd4x-device
@/scd4x-device
Create an SCD4X device.
scd4x-device
DEV
DEV@/scd4x-device
An SCD4X device.
To use the node in your project you should have the wayland/scd4x-co2-rh-temp 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

#pragma XOD require "https://github.com/sensirion/arduino-core"
#pragma XOD require "https://github.com/Sensirion/arduino-i2c-scd4x"

#include <SensirionI2CScd4x.h>

node {

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

    // Keep Adafruit_SGP30 object in state
    SensirionI2CScd4x sensor = SensirionI2CScd4x();


    void evaluate(Context ctx) {
        emitValue<output_DEV>(ctx, &sensor);
    }
}