Write an Arduino code for school project.
One button input control different led
Four LED output on different pins
When button press 3 times led one on rest off
When 5 times press led 2 on rest off
When 7 times press led 3 on rest off
When long press 3 seconds blink LED which is on
Long press 5 seconds all led off
The valid input for button press is minimum 50 milliseconds, denounce function for button input
The time within which a valid 3,5,7 input is acceptable is 10 seconds. Else the code looks for valid input again
After any LED on LED auto off after 15 minutes
After any LED on, same LED to blink for 30 seconds at end of 10th minutes and then again blink from 14th mins to 15th mins
If a valid input received within the time any led is ON, new input is acceptable and time counter restarts.
Code should work on Arduino Uno, nano and other Arduino. A serial print of all actions to show code running. Like button press, 3 press accepted. Etc.