To use the node in your project you should have the nazarijtipusak080/prototype-relay 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
nodespace{
// 'sprite', 8x8px
static const unsigned char sprite [] PROGMEM = {
0x02
,0x04
,0x08
,0xf1
,0x01
,0x01
,0x01
,0x00
};
}
node {
void evaluate(Context ctx) {
// The node responds only if there is an input pulse
if (!isInputDirty<input_UPD>(ctx))
return;
// Get a pointer to the `Adafruit_SSD1306` class instance
auto display = getValue<input_DEV>(ctx);
auto cursor_x = getValue<input_X>(ctx);
auto cursor_y = getValue<input_Y>(ctx);
display->drawBitmap(cursor_x, cursor_y,sprite,8,8,1);
emitValue<output_DONE>(ctx, 1);
}
}