Start a new topic

4 Dual state Button

i want to control 4 relays with 4 dual state button to switch on/off

Si want the arduino code for 4 relays to on/off through dual state button . In library there is only one dual state button code ,any one can guide me

1 person likes this idea

Guidance shall be:

Library example of the one dual state button, needs to be copied three times and these three adjusted.

i dont understand how to be do it . which part of code should be copied. i am sharing the code ,you may be make changes ,



This is a programming issue.  I can not pass such vast amounts of logic knowledge.

It will require that you study the techniques for programming.

can it is possible the nextion lcd send text to arduino instead of  this 0x65 0x00 0x01 0xff 0xff



The reason why the Nextion sends such 0x65 0x00 0x01 0xFF 0xFF 0xFF is to provide an organization of logic and all 0x65 type returns have a particular meaning that requires a particular action and handling.

When you substitute with another form of return, you have taken on the extra responsibility to organize and define your custom protocol.  Without such organization, you may have many instances where problems and errors can occur if your custom organization logic has not provided for scenarios you did not account for.

But by all means, such a custom protocol can be created

Also interpretation and formatting of the data sent and received will be your responsibility.

- Example 0x65 is already the ascii character e, or it could be the decimal integer value of 101.

     - or it could be interpreted to set the eight gpio pins (Enhanced Models)

     IO0=on, IO1=off, IO2=on, IO3=off, IO4=off, IO5=on, IO6=on, and IO7=off

can´t use two dual buttons in the same page?

i set two buttons but just recognizeme one of theme... there is a solution for this?

You can have between 1 and 250 DualStateButtons in the same page.

 - no solution required - you can have 1 to 250 in the same page.

Login or Signup to post a comment