nextion-event-touch-core

mendrig/nextion-lib/nextion-event-touch-core

No description
nextion-event-touch-core
@/nextion-event-touch-core
BYTEnumber
ARTstring
nextion-event-touch-core
EVENT
PAGE
COMP
PRESS
BYTE
ART
PRESSnumber
COMPnumber
PAGEnumber
EVENTstring
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 EventArt = getValue<input_ART>(ctx);
    auto byte = getValue<input_BYTE>(ctx);
    Number page = 255;
    Number component = 255 ;
    Number pressed = 255;
    Number end = 254;
    
    
    if ( byte == 101) //Touch-Event
    {
       page = Serial2.read();
       component = Serial2.read();
       pressed = Serial2.read();
    }
     end = Serial2.read();
     end = Serial2.read();
     end = Serial2.read();
    
   emitValue<output_EVENT>(ctx, EventArt);
   emitValue<output_PAGE>(ctx, page);
   emitValue<output_COMP>(ctx, component);
   emitValue<output_PRESS>(ctx, pressed);
}