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
Guidance shall be:
Library example of the one dual state button, needs to be copied three times and these three adjusted.
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.
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