How could I make it so when one of four buttons is pressed a “script” pretty much runs of what I want to happen. So I want each of the 4 buttons to have its own script that runs when pressed and the other buttons are locked so if you press them while one script is going all buttons are disabled until the script finishes
So I would like to have different “light shows” happen when different buttons are pressed with 4 WS2812B individually addressable Leds and 4 buttons. I would like it so when no buttons are pressed the Leds are yellow, but when one of the buttons is pressed the led corresponding to that button turns green while the other ones turn red for 10 seconds and then the red ones go off and the green one goes blue and flashes for 5 seconds and then they all go back to yellow waiting until another button is pressed.
I was able to get multiple buttons wired up and they all went through a single analog pin and when held down certain Leds out of a row of 7 would light up and different ones would light up corresponding to what button was pressed but I’ve tried for a few hours trying to find how to make a button start something and then have RGB Leds do different things but I can't seem to figure it out.
I’m just starting to get the hang of coding and I still have to look at other people’s example and piece it together to make my own
How could I trigger something like this with 4 buttons and an Arduino?
thanks! ![]()