Time to Low Power sleep ~MS milliseconds timeout
before Returning to active state.(Each type of board will have a different MAX, Check ActMS for actual timeout)
INITpulse
Pulse to go to Sleep.
ActMSnumber
The estimated actual milliseconds
before Returning (in milliseconds) is returned
To use the node in your project you should have the bradzilla84/sleepydog 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/adafruit/Adafruit_SleepyDog"
{{#global}}
#include <Adafruit_SleepyDog.h>
{{/global}}
struct State {
};
{{ GENERATED_CODE }}
void evaluate(Context ctx) {
if (isInputDirty<input_INIT>(ctx)){
// auto state = getState(ctx);
auto Sleep = Watchdog.sleep(getValue<input_MS>(ctx));
emitValue<output_ActMS>(ctx, Sleep);
return;
}
}