Arduino Pushbutton interrupt?
So I've hooked up my Christmas lights to some solid state relays and hooked those to my Arduino and I have some interesting patterns of lights that I can make. But I would like to be able to turn the lights on and then press a push button and have one light pattern start and then press that same button again and get a second pattern and so on. I've gotten that to work, the only problem is, the patters are quite lengthy (5-10 seconds) and I don't want to have to hold the button until the pattern is over. So how do I use the interrupt function (or one like it) to stop the function and start a new one as soon as the button is pressed?