I am using arduino pro micro 5v 16Mhz. I have built a simple IR transmitter circuit as shown. Led is connected to pin 9 through 330ohm resistor
The code i am using is https://github.com/z3t0/Arduino-IRremote/blob/master/examples/IRsendDemo/IRsendDemo.ino
Although this worked yesterday, it doesn't seem to work now. I was able to turn on and off my TV yesterday but the led is not even blinking now. I checked led, its working.
After hours of trying to make it work I tried different library. https://github.com/cyborg5/IRLib2/blob/master/IRLib2/examples/send/send.ino
Surprisingly this seems to work but the code is a bit complicated for receiver.
I want to use the first library. Any help is appreciated. Thank you.
-
I'm not sure what help anyone can give you here. You had it working, presumably changed nothing, and now it doesn't -- how can we debug that?Mark Smith– Mark Smith02/15/2017 15:40:17Commented Feb 15, 2017 at 15:40
-
It seems the library got the timer pins wrong I changed them and its working now.Teja Allani– Teja Allani02/15/2017 16:10:42Commented Feb 15, 2017 at 16:10
-
How did it ever work?Mark Smith– Mark Smith02/16/2017 07:21:30Commented Feb 16, 2017 at 7:21
-
I used nrf24l01 module in between and maybe it changed timer settings.Teja Allani– Teja Allani02/18/2017 12:34:57Commented Feb 18, 2017 at 12:34
1 Answer 1
The problem was with timer timer settings in library. I checked different timer configurations with different pins and its working now. I found out that timer4 uses pin 13 which is not used in Pro Micro board so I am now using timer 3.