I've added an on and off button to my project and I'm having some difficulties in customizing the on and off button for the code
Example
ButtonPin1 is for turning on the LEDs
ButtonPin2 is to turn the code on and off
So that ButtonPin1 will not work unless you press ButtonPin2 and another click on ButtonPin2 stops ButtonPin1 again and so on..
Now I want ButtonPin2 to run the code when clicking on it three clicks instead of one and the third click is prolonged for two seconds and stop I want it as it is with only one click
Please follow the advice given in the link below when posting code , use code tags and post the code here to make it easier to read and copy for examination
The problem is not occurring because you are new to the forum. The problem does not affect all new forum members, but it does affect many. The new members that are not affected by the problem with posting code are the few that read the forum guide before they post.
Hello
add comments to your sketch to describe the desired functionality.
Use real names for variables. The variable names M1 to M6 do not help, which button is the start- and stop button?
Making extensive changes to a post that has already been commented on is not good manners and I note that you still did not use code tags to make the code easier to read and to copy with a single click
I created a new topic because I just got permission to upload the code to facilitate the process of downloading or copying the code.. Please do not be blamed, as my ability to use the Internet is weak.
The easiest way to post code is to right click in the IDE and select "Copy for forum" then paste the clipboard into a post here. The code tags will be automatically added by the IDE