How do you plan to solve it?
Four LEDs connected to pins 2, 3, 4, and 5 with resistors to limit current.
Push button connected to pin 7 configured with INPUT_PULLUP.
Button handling:
Implements debouncing to avoid false triggers.
Changes patterns on button press using % math to cycle through all patterns.
Pattern system:
Uses function pointers to dynamically call the active pattern.
Five total LED patterns with different behaviors.
Custom patternDelay () function checks for button press during delays.
Patterns:
Pattern 1: All LEDs are blinking at once.
Pattern 2: Alternating LEDs.
Pattern 3: Running light (single LED running).
Pattern 4: Two LEDs going at once.
Pattern 5: Knight Rider (back and fort).
/*Paste your code here*/
Add a video of the output (know more)