rsbabin/custom-characters
struct State { }; {{ GENERATED_CODE }} void printAt(LiquidCrystal_I2C* lcd, uint8_t rowIndex, uint8_t posIndex, Number charnum) { lcd->setCursor(posIndex, rowIndex); lcd->write(byte(charnum)); } void evaluate(Context ctx) { auto t = getValue<input_DEV>(ctx); if (isInputDirty<input_DO>(ctx)) { uint8_t row = (uint8_t) getValue<input_ROW>(ctx); uint8_t pos = (uint8_t) getValue<input_POS>(ctx); Number charNum = getValue<input_num>(ctx); if (row < 0 || row >= t.rows || pos < 0 || pos >= t.cols) { raiseError<output_DONE>(ctx); return; } printAt(t.lcd, row, pos, charNum); emitValue<output_DONE>(ctx, 1); } emitValue<output_DEVU0027>(ctx, t); }
© 2017–2024XOD Inc
Contact us: hello@xod.io