Hello everyone! I have recently started using buttons in one of my projects, and I found a nice way to poll the buttons to make sure I always catch the keypress (I got the code from adafruit) Anyway, the code involves using timer2 to poll the buttons every 15 millis. To do that it uses the following bit of code to trigger interrupts:
TCCR2A = 0;
TCCR2B = 1<<CS22 | 1<<CS21 | 1<<CS20;
//Timer2 Overflow Interrupt Enable
TIMSK2 |= 1<<TOIE2;
It works extremely well, but now none of my PWM outputs are working. I tried pins on and off of timer2 to no avail. Is it not possible to use this type of interrupt and pwm in the same program?