To use the node in your project you should have the wayland/rtc-zero 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/arduino-libraries/RTCZero"
#include <RTCZero.h>
node {
meta {
// Define our custom type as a pointer on the class instance.
using Type = RTCZero*;
}
RTCZero rtc = RTCZero();
void evaluate(Context ctx) {
// It should be evaluated only once on the first (setup) transaction
if (!isSettingUp())
return;
rtc.begin();
emitValue<output_DEV>(ctx, &rtc);
}
}