Using SoftPWM and IRremote libraries on Mega 2560 V2

So i managed to change my projects pinout so that neither timers 2 or 3 are used for ouput and I have assigned 2 to the IR library and 3 to the SoftPWM library. The problem occurs when the duty cycle of the SoftPWM output pins are above 2% and what happens is that the IR remote is no longer being decoded, i suspect this is because timer 3 is flashing faster than the timer 2 IR decode transmitter.

My question is, is there a way to modify the SoftPWM library so that when an IR code is being decoded, to pause itself? I could possible attach the IR signal pin to an interrupt and do it that way (is this possible?) but I wanted to see if anyone here has any good suggestions.

Anyone?

Having the same problem. I want to use 6 PWM-Pins for LED control and want IR remote-input on top.
IR with PWM on all pins simply hangs and SoftPWM+IRremote won’t compile :frowning:

The problem occurs when the duty cycle of the SoftPWM output pins are above 2% and what happens is that the IR remote is no longer being decoded, i suspect this is because timer 3 is flashing faster than the timer 2 IR decode transmitter.

Most likely, the softPWM is using up all of the available MCU cycles. The best way to solve this is to use the available hardware PWM on Timers 3,4 & 5. It looks like there are 3 PWM pins for each of these timers = 9 in all. Plus Timer1 seems to have an additional 2 PWM pins available.

Worth investing the time to learn how to set up hardware PWM....usually less than than 5 'C' instructions. There may also be libraries available.