One of more DS18B20 devices on a single one-wire bus.
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
#pragma XOD require "https://github.com/milesburton/Arduino-Temperature-Control-Library"
#include <DallasTemperature.h>
node {
meta {
using Type = DallasTemperature*;
}
uint8_t mem[sizeof(DallasTemperature)];
void evaluate(Context ctx) {
if (!isSettingUp()) return;
auto ow = getValue<input_OWB>(ctx);
Type sensors = new (mem) DallasTemperature(ow);
sensors->begin();
emitValue<output_DEV>(ctx, sensors);
}
}