The on-board relative humidity and temperature sensors are influenced by thermal self-heating of SCD30 and other electrical components. A temperature offset can be specified to compensate for self-heating. Temperature offset value is saved in non-volatile memory. The last set value will be used for temperature offset compensation after repowering.
set-temperature-offset
@/set-temperature-offset
The on-board relative humidity and temperature sensors are influenced by thermal self-heating of SCD30 and other electrical components. A temperature offset can be specified to compensate for self-heating. Temperature offset value is saved in non-volatile memory. The last set value will be used for temperature offset compensation after repowering.
DEV@/scd30-device
An SCD30 device.
OFSnumber
Temperature offset in degrees Celsius.
UPDpulse
Update. Triggers set temperature offset.
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->setTemperatureOffset(getValue<input_OFS>(ctx));
emitValue<output_DONE>(ctx,1);
}