Hi Hans,
First of all, I want to thanks you for all the shared informations on your website,
I am please to use your code done "AllEffects LEDStrip".
Please I apologize for my rosty english.
I have look your cleaver way to use reset by jumping to reset vector and saving data to EEPROM.
On my side I try another way, without the EEPROM, it is more a kind of software reset.
1/ I save the stack pointer after setup
2/ I save the return adress of where in the code I want to be back
3/ I use interrupt for 2 push button one for inc the other for decrement a variable volatile byte selectedEffect;
4/ at the end of interrupt I get back the stack pointer saved at 1/ and get code back to adress saved in 2/
That the idea and as you will see in the code hereunder that's works.
But when I link that code with Fasteled AllEffects LEDStrip or NeoPixel AllEffects LEDStrip I get strange behavior that the stack pointer and return adress whas undefined.
If I comment the use of ledstrip then my undefined variables are back, i feel that should be a problem of linker xor compiler pragma but I am not so familiar with such matter, may be you will see and suggest other way, if you have time to have look on it, if you need more comments of my code please to not hesitate to ask for.
If you intend to run this code please notice that I use Arduino ATMega2560 and in the IRQ handler I push and pop three byte for return adress, where standart Arduino need only two!
Of course on hardware side if your design have only one push button that would work, you will just go on the related IRQ.
There is no matter on usage, your code run very well on my hardware, as you I just remain curious of whats going on and want to share my experience.
If you find usage to share this code please do it, I have no blog or website.
Thanks again for all of your sharing and stay curious.