I am looking for some code to emulate.
I have a single button that cycles through 6 options (timer1 configurations). The device has 6 status LEDS - each one indicates which of the 6 options is currently selected.
I am using Danni's key debounce code the button. I want my code to "de-couple" the LED from the timer1 one options. I typically rely heavily on global variables. I'd think I need my code to pass parameters/arguments. Or should I look into state machines?
I write spaghetti code and I'm trying to get better.
Any help at all is greatly appreciated!