Page cardQR Attributes Scope : local Dragging : 0 Disable release event after dragging: 0 Send Component ID : disabled Locked : no Swide up page ID : disabled Swide down page ID : disabled Swide left page ID : disabled Swide right page ID : disabled Events Preinitialize Event vis p0,0 vis tSend,0 vis tInstruction,0 vis tTmp,0 vis tId,0 vis bPrev,0 vis bNext,0 //ui e1 vis btOnOff1,0 vis tIcon1,0 vis tEntity1,0 vis bText1,0 //ui e2 vis btOnOff2,0 vis tIcon2,0 vis tEntity2,0 vis bText2,0 Variable (string) strCommand Attributes Scope : local Text : Max. Text Size: 200 Variable (string) entn Attributes Scope : local Text : Max. Text Size: 80 Variable (string) tSend Attributes Scope : local Text : Max. Text Size: 100 Variable (string) tTmp Attributes Scope : local Text : Max. Text Size: 10 Variable (string) tId Attributes Scope : local Text : Max. Text Size: 20 Variable (string) tInstruction Attributes Scope : local Text : Max. Text Size: 20 Variable (string) entn1 Attributes Scope : local Text : Max. Text Size: 80 Variable (string) entn2 Attributes Scope : local Text : Max. Text Size: 80 Variable (string) type1 Attributes Scope : local Text : Max. Text Size: 10 Variable (string) type2 Attributes Scope : local Text : Max. Text Size: 10 Text tEntity1 Attributes Scope : local Dragging : 0 Disable release event after dragging: 0 Send Component ID : disabled Associated Keyboard : none Text : tEntity1 Max. Text Size : 30 Text tIcon1 Attributes Scope : local Dragging : 0 Disable release event after dragging: 0 Send Component ID : disabled Associated Keyboard : none Text :  Max. Text Size : 5 Text tEntity2 Attributes Scope : local Dragging : 0 Disable release event after dragging: 0 Send Component ID : disabled Associated Keyboard : none Text : tEntity1 Max. Text Size : 30 Text tIcon2 Attributes Scope : local Dragging : 0 Disable release event after dragging: 0 Send Component ID : disabled Associated Keyboard : none Text :  Max. Text Size : 5 Text tHeading Attributes Scope : local Dragging : 0 Disable release event after dragging: 0 Send Component ID : disabled Associated Keyboard : none Text : Max. Text Size : 40 Picture p0 Attributes Scope : local Dragging : 0 Disable release event after dragging: 0 Send Component ID : disabled QR Code qr0 Attributes Scope : local Dragging : 0 Disable release event after dragging: 0 Send Component ID : disabled Text : Max. Text Size : 105 Button bNext Attributes Scope : local Dragging : 0 Disable release event after dragging: 0 Send Component ID : disabled State : unpressed Text :  Max. Text Size : 10 Events Touch Press Event tSend.txt="event,buttonPress2,cardAlarm,bNext" //send calc crc btlen tSend.txt,sys0 crcrest 1,0xffff // reset CRC crcputh 55 bb crcputs sys0,2 crcputs tSend.txt,0 //send cmd printh 55 bb prints sys0,2 prints tSend.txt,0 prints crcval,2 Button bPrev Attributes Scope : local Dragging : 0 Disable release event after dragging: 0 Send Component ID : disabled State : unpressed Text :  Max. Text Size : 10 Events Touch Press Event tSend.txt="event,buttonPress2,cardAlarm," if(bPrev.txt=="") { tSend.txt+="bUp" }else { tSend.txt+="bPrev" } //send calc crc btlen tSend.txt,sys0 crcrest 1,0xffff // reset CRC crcputh 55 bb crcputs sys0,2 crcputs tSend.txt,0 //send cmd printh 55 bb prints sys0,2 prints tSend.txt,0 prints crcval,2 Button bText1 Attributes Scope : local Dragging : 0 Disable release event after dragging: 0 Send Component ID : disabled State : unpressed Text : Max. Text Size : 10 Events Touch Press Event tSend.txt="event,buttonPress2,"+entn1.txt+",button" //send calc crc btlen tSend.txt,sys0 crcrest 1,0xffff // reset CRC crcputh 55 bb crcputs sys0,2 crcputs tSend.txt,0 //send cmd printh 55 bb prints sys0,2 prints tSend.txt,0 prints crcval,2 Button bText2 Attributes Scope : local Dragging : 0 Disable release event after dragging: 0 Send Component ID : disabled State : unpressed Text : Max. Text Size : 10 Events Touch Press Event tSend.txt="event,buttonPress2,"+entn1.txt+",button" //send calc crc btlen tSend.txt,sys0 crcrest 1,0xffff // reset CRC crcputh 55 bb crcputs sys0,2 crcputs tSend.txt,0 //send cmd printh 55 bb prints sys0,2 prints tSend.txt,0 prints crcval,2 Dual-state Button btOnOff1 Attributes Scope : local Dragging : 0 Disable release event after dragging: 0 Send Component ID : disabled State : unpressed Text : Max. Text Size : 10 Events Touch Press Event tSend.txt="event,buttonPress2,"+entn1.txt+",OnOff," covx btOnOff1.val,tTmp.txt,0,0 tSend.txt+=tTmp.txt //send calc crc btlen tSend.txt,sys0 crcrest 1,0xffff // reset CRC crcputh 55 bb crcputs sys0,2 crcputs tSend.txt,0 //send cmd printh 55 bb prints sys0,2 prints tSend.txt,0 prints crcval,2 Dual-state Button btOnOff2 Attributes Scope : local Dragging : 0 Disable release event after dragging: 0 Send Component ID : disabled State : unpressed Text : Max. Text Size : 10 Events Touch Press Event tSend.txt="event,buttonPress2,"+entn1.txt+",OnOff," covx btOnOff1.val,tTmp.txt,0,0 tSend.txt+=tTmp.txt //send calc crc btlen tSend.txt,sys0 crcrest 1,0xffff // reset CRC crcputh 55 bb crcputs sys0,2 crcputs tSend.txt,0 //send cmd printh 55 bb prints sys0,2 prints tSend.txt,0 prints crcval,2 Hotspot mSwipeNext Attributes Scope : local Dragging : 0 Disable release event after dragging: 0 Send Component ID : disabled Events Touch Press Event //This thin hotspot down the edge will intercept swipes //from the bezel into the screen area before the //Nextion register touch for any other components - //IF the hotspot is 'layered' at the top (use the up //arrow at the far left of the Nextion Editor Tool Bar). // //Calibrate how wide the edge hotspot has to be on your //own physical device using this screen to test the //x & y coordinates where the swipe is first detected.) //--------------------------- //The navigation text is stored as local variable within tld.txt //Pressing right button if swiped on the right side of the screen // spstr tId.txt,tTmp.txt,"|",1 if(tTmp.txt=="1") { click bNext,1 } Hotspot mSwipeUp Attributes Scope : local Dragging : 0 Disable release event after dragging: 0 Send Component ID : disabled Events Touch Press Event //This thin hotspot down the edge will intercept swipes //from the bezel into the screen area before the //Nextion register touch for any other components - //IF the hotspot is 'layered' at the top (use the up //arrow at the far left of the Nextion Editor Tool Bar). // //Calibrate how wide the edge hotspot has to be on your //own physical device using this screen to test the //x & y coordinates where the swipe is first detected.) //--------------------------- //The navigation text is stored as local variable within tld.txt //Pressing up button if swiped on the top side of the screen // spstr tId.txt,tTmp.txt,"|",0 if(tTmp.txt=="2") { click bPrev,1 } Hotspot mSwipePrev Attributes Scope : local Dragging : 0 Disable release event after dragging: 0 Send Component ID : disabled Events Touch Press Event //This thin hotspot down the edge will intercept swipes //from the bezel into the screen area before the //Nextion register touch for any other components - //IF the hotspot is 'layered' at the top (use the up //arrow at the far left of the Nextion Editor Tool Bar). // //Calibrate how wide the edge hotspot has to be on your //own physical device using this screen to test the //x & y coordinates where the swipe is first detected.) //--------------------------- //The navigation text is stored as local variable within tld.txt //Pressing left button if swiped on the left side of the screen // spstr tId.txt,tTmp.txt,"|",0 if(tTmp.txt=="1") { click bPrev,1 } Timer tmSerial Attributes Scope : local Period (ms): 50 Enabled : yes Events Timer Event // data available if(usize>1) { bufferPos=0 while(bufferPos