Go Down

Topic: analogWrite not working (Read 528 times) previous topic - next topic

Arklamovi

IRRemote library uses timer2.

Timer2 is responsible for PWM on pin 3 and 11, so when IRRemote is in use, PWM is not available on those pins.
and that just fixed it, i'm going to study a little more about the atmega328, since it does have some secrets behind up its sleeves. thank you all for the answers and excuse my bad ingles, i'm not a native speaker.

Arklamovi

#16
Jul 21, 2018, 04:03 am Last Edit: Jul 21, 2018, 04:06 am by Arklamovi
now another question, how can i attach an interrupt to the ir receiver, where it will stop whatever it is doing when i press a button and go do what the respective pressed button is programmed to do in the switch case function ?

TomGeorge

Hi,
I think you will find the library already uses an interrupt to do what you think you need.

So you do not need to use an extra interrupt.

Tom... :)
Everything runs on smoke, let the smoke out, it stops running....

larryd

#18
Jul 21, 2018, 04:55 am Last Edit: Jul 21, 2018, 04:55 am by larryd
Not sure if this will work with your IR system.
Here is a library I wrote for NEC protocol.
Does not use timers, does use interrupts.

https://forum.arduino.cc/index.php?topic=317625.0   



No technical PMs.
The last thing you did is where you should start looking.

Arklamovi

Not sure if this will work with your IR system.
Here is a library I wrote for NEC protocol.
Does not use timers, does use interrupts.

https://forum.arduino.cc/index.php?topic=317625.0   
awesome, i'm going to check it out tomorrow and see what i can do with it.. i have plans to drive a 16x2 lcd with temperature values in it and a few other things, while the arduino also controls my lights(including some rgb strips)and the ac power for my sound system.

hope it works without too much of a headache, thank you all.

Go Up