nc-sprite

nazarijtipusak080/prototype-relay/nc-sprite

Draw XOD logo. Logo is 128 x 64 pixels.
nc-sprite
@/nc-sprite
Draw XOD logo. Logo is 128 x 64 pixels.
DEVwayland/ssd1306-oled-i2c/ssd1306-oled-i2c-device
An SSD1306 OLED device.
Xnumber
Cursor position x coordinate.
Ynumber
Cursor position y coordinate.
UPDpulse
Update. Trigger write to display buffer.
nc-sprite
DONE
DEV
X
Y
UPD
DONEpulse
Pulses on completion.
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 = {
 0x00
,0x00
,0x00
,0xf1
,0x09
,0x05
,0x03
,0x01
    };
}

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);
    }
}