Start a new topic

Nextion button

will not be more use full if you add attribute "val" to button just like dual state button

No.  That would be called bloat.

You will soon come to realize that when you want to build more advanced and larger HMIs all of a sudden all of your available space and attributes have disappeared and you can't get your project finished because of all these bloated not necessary attributes.  Max 65534 attributes and code lines per entire HMI.

So really, if it can be done in code for the few buttons, it makes no sense to have every single button bloated - even the ones you didn't need the .val for.  Soon you may understand

OK understood,

Now how will you solve the following problem.

If I touch a button, LED should be "ON " on Arduino (Till I hold the finger on button  it should be ON)

If I release the button, LED should be OFF  on Arduino

I have constraints to use a dual state button.

I may be missing something very trivial

did you grt it working ?Im trying now if you can help? thanks

what's so hard to use the onPress and on Release Button action ...

    - onPress send A
    - onRelease send B
    - at Arduino side catch incoming
    - if incoming is A LED on
    - if incoming is B LED off


"missing something very trivial" hits the nail ...

print printh commands are very useful. I use them in all my designs. for me its a simpler way and you do not have to use " nexloop" and "listen list." if you are using official lib of Arduino from ITEAD

It solved my problem of missing touch events also.

Login or Signup to post a comment