I recived my Nextion today and already wokring with it. But i have the problem:
I have 9 Buttons: Nummbers from 0-9 and if i click one i want to add one to the Number Widget. Similar to a phone. And how do i send the Values? I have a button for it but what is the command to send it via Serial?
If you want to inform your MCU that your button has been pressed or released, simply check the Send Component ID in the Touch Press Event or the Touch Release Event - your MCU can react to this and process MCU side.
Otherwise perhaps print n0.val may serve your purpose.
Please review the Nextion Instruction Set
The Problem is that he all time say: Invalid Variables:
My command on the BUttons are: (n_cycle.val*10)+1
n_cycle is the objename and it is a NUMBER widget. ?
if n_cycle is a number Component (Component not widgets)
Button event code on Nextion should look more like
Nextion does not support complex parsing
Nor is ( ) order of operations supported
Nor is floating point
Nextion is Integer based parsing left to right on each operator