#pragma XOD require "https://github.com/RobTillaart/DHT20"
#include <DHT20.h>
node {
meta {
using Type = DHT20*;
}
uint8_t mem[sizeof(DHT20)];
void evaluate(Context ctx) {
if (!isSettingUp())
return;
auto wire = getValue<input_I2C>(ctx);
Type sensor = new (mem) DHT20(wire);
emitValue<output_DEV>(ctx, sensor);
}
}