clear

xod-dev/ws2812/clear

Clears (turns off) of all pixels in the device.
clear
@/clear
Clears (turns off) of all pixels in the device.
DEV@/ws2812-device
The device
DOpulse
Trigger to turn all pixels off
clear
DEV
DO
DEV'
DONE
DONEpulse
Fires when the operation is done
DEV'@/ws2812-device
The device
To use the node in your project you should have the xod-dev/ws2812 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) {
        auto dev = getValue<input_DEV>(ctx);
        if (isInputDirty<input_DO>(ctx)) {
            dev->fill(0, 0, 0);
            emitValue<output_DONE>(ctx, 1);
        }
        emitValue<output_DEVU0027>(ctx, dev);
    }
}