scroll-rgblcd

cesars/rgblcd/scroll-rgblcd

No description
scroll-rgblcd
@/scroll-rgblcd
lcd@/rgblcd
leftnumber
rightnumber
timenumber
ms
actboolean
initpulse
scroll-rgblcd
lcd
left
right
time
act
init
done
donepulse
To use the node in your project you should have the cesars/rgblcd 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) {

    if (!isInputDirty<input_init>(ctx)){
        return;}

    auto lcd = getValue<input_lcd>(ctx);
    auto _time = getValue<input_time>(ctx);
    auto left = getValue<input_left>(ctx);
    auto right = getValue<input_right>(ctx);

    if (getValue<input_act>(ctx)){
        for (int positionCounter = 0; positionCounter < left; positionCounter++) {
            // scroll one position left:
            lcd->scrollDisplayLeft();
            // wait a bit:
            delay(_time);
        }
        for (int positionCounter = 0; positionCounter < right; positionCounter++) {
            // scroll one position right:
            lcd->scrollDisplayRight();
            // wait a bit:
            delay(_time);
        }
    }
        emitValue<output_done>(ctx, 1);
}