One or more DS18B20 devices on a single one-wire bus.
RESbyte
Resolution (bits). Options: 9d = 9 bits, 10d = 10 bits, 11d = 11 bits, 12d = 12 bits. If new resolution is out of range, 9 bits is used.
UPDpulse
Update.
DONEpulse
Pulse when resolution set.
To use the node in your project you should have the wayland/ds18b20 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
node {
void evaluate(Context ctx) {
if (!isInputDirty<input_UPD>(ctx))
return;
auto sensors = getValue<input_DEV>(ctx);
sensors->setResolution(getValue<input_RES>(ctx));
emitValue<output_DONE>(ctx, 1);
}
}