Double post, but I originally posted this in the wrong section. Excuse me for that.
Greetings. Apologies for the rather noobish question, but this is my first attempt at cobbling together my own code.
I want to light up 5 (or maybe 6) LEDs off of the PWM pins. Easy enough to do.
Now I would like to be able to get the LEDs to do different actions after a button is pressed. Thus the buttstatechange in the title.
Really I would like these options.
1) All LEDs on. (Easy) 2) All LEDs fading in and out together. (Easy) 3) Random fading. (Easyish I believe) 4) An LED Chaser (Easyish and totally childish)
Now I've done each of these things independently, but I'm completely at a loss as to how to get the sketch to switch between the different sets of code via a button press. From what I've been able to google the buttonstatechange seems like a good option, but I'm sure someone knows a much better option out there instead. (Or knows how to set up a buttonstatechange, or can show me a nice example code that changes between several different directions.)
Any ideas or thoughts oh great coders? I'd settle for just "On" and "All Fading Together."