http://web.ndak.net/jdgrotte/kromatoobz/kromatoobz.html
Wish I had a movie to go with it...
http://web.ndak.net/jdgrotte/kromatoobz/kromatoobz.html
Wish I had a movie to go with it...
That is great! Is this a product of yours? The menu/controller interface with more than one button easily impresses me. I am sure I'll be able to get more buttons for menus to work as I progress, hehehe. After getting the "On Interrupt" to finally work, blinking LEDs have become quite fun! Now to figure out how to have a hold button in the interrupt handler do what I want, so far no beans![]()
I think the key you might be looking for is...keep the interrupt handler as short as possible. Set a flag, save a number, do something, just don't do much. Do the main thing (i.e. button press handling, mode changing, etc) in your main loop. If you're doing the fading using PWM and interrupts, then the only thing the interrupt should do is run the PWM and set the LEDs, nothing else. Check for a keypress in your main loop, and don't use any pauses to keep from getting 'double hits' on the buttons. When you detect a keypress, set a byte value and have it count down with the PWM interrupt and don't accept any keypresses until that counter is back at zero.
Bookmarks