nextion-read-byte

mendrig/nextion-lib/nextion-read-byte

No description
nextion-read-byte
@/nextion-read-byte
DATAboolean
nextion-read-byte
DATA
CHECK
BYTE
BYTEnumber
CHECKnumber
To use the node in your project you should have the mendrig/nextion-lib 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) {
    //auto inValue = getValue<input_IN>(ctx);
    Number Check = 254;
    Number byte;
    if (getValue<input_DATA>(ctx))
    {
        Check = 1;
    } 
    
    if (Serial2.available())  
    {
        byte = Serial2.read();
    }  
    
       
    
    emitValue<output_CHECK>(ctx, Check);
    emitValue<output_BYTE>(ctx, byte);
}