To use the node in your project you should have the ivanmason/lcd16x2x5button 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
struct State {
};
{{ GENERATED_CODE }}
void evaluate(Context ctx) {
emitValue<output_DEVU0027>(ctx, getValue<input_DEV>(ctx));
if (isInputDirty<input_UPD>(ctx)){
auto lcd = getValue<input_DEV>(ctx);
auto text = getValue<input_TEXT>(ctx);
lcd->setCursor(getValue<input_Cx>(ctx), getValue<input_Cy>(ctx));
uint8_t whitespace = 16;
for (auto it = text.iterate(); it; ++it, --whitespace)
lcd->write(*it);
// Clear the rest of the line
while (whitespace--)
lcd->write(' ');
emitValue<output_DONE>(ctx, 1);
}
}