lcd16x2

ivanmason/lcd16x2x5button/lcd16x2

Configures board peripherals to start lcd
lcd16x2
@/lcd16x2
Configures board peripherals to start lcd
RSport
ENport
D4port
D5port
D6port
D7port
UPDpulse
lcd16x2
DEV
DONE
RS
EN
D4
D5
D6
D7
UPD
DONEpulse
DEV@/lcd16x2
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

{{#global}}
#include <LiquidCrystal.h>
{{/global}}

using Type = LiquidCrystal*;

struct State {
};

{{ GENERATED_CODE }}

void evaluate(Context ctx) {
     if (isInputDirty<input_UPD>(ctx)){
         auto lcd = new LiquidCrystal(
            (int)getValue<input_RS>(ctx),
            (int)getValue<input_EN>(ctx),
            (int)getValue<input_D4>(ctx),
            (int)getValue<input_D5>(ctx),
            (int)getValue<input_D6>(ctx),
            (int)getValue<input_D7>(ctx));

        lcd->begin(16, 2);
        emitValue<output_DEV>(ctx,lcd);
        emitValue<output_DONE>(ctx, 1);
    }
    
}