set-measurement-interval

wayland/scd30-co2-rh-temp/set-measurement-interval

Set interval between measurements. The measurement interval is saved in non-volatile memory.
set-measurement-interval
@/set-measurement-interval
Set interval between measurements. The measurement interval is saved in non-volatile memory.
DEV@/scd30-device
An SCD30 device.
IVALnumber
Interval between measurements in seconds. Can take a value from 2 to 1800 (30 minutes).
UPDpulse
Update. Triggers set measurement interval.
set-measurement-interval
DEV
IVAL
UPD
DONE
DONEpulse
Pulses on completion.
To use the node in your project you should have the wayland/scd30-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

struct State {
};

{{ GENERATED_CODE }}

void evaluate(Context ctx) {
    // The node responds only if there is an input pulse
    if (!isInputDirty<input_UPD>(ctx))
        return;

    // Get a pointer to the `SCD30` class instance
    auto airSensor = getValue<input_DEV>(ctx);

    airSensor->setMeasurementInterval(getValue<input_IVAL>(ctx));
    emitValue<output_DONE>(ctx,1);
}