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
#include <WS2812.h>
node {
static_assert(isValidDigitalPort(constant_input_PORT), "must be a valid digital port");
meta {
using Type = WS2812*;
}
uint8_t mem[sizeof(WS2812)];
void evaluate(Context ctx) {
if (!isSettingUp()) return;
uint32_t w = (uint32_t)getValue<input_W>(ctx);
Type t = new (mem) WS2812(constant_input_PORT, w);
emitValue<output_DEV>(ctx, t);
}
}