I want to send a generic (not Sony, etc.) remote's signal from my Arduino. I have already used a IR decoder program to capture the timing of the signal:
int IRsignal[] = {
// ON, OFF (in 10's of microseconds)
88, 88,
174, 88,
86, 86,
88, 86,
88, 88,
86, 86,
88, 174,
86, 88,
86, 88,
174, 174,
86, 88,
86, 2252,
88, 88,
174, 88,
86, 86,
88, 88,
86, 88,
86, 86,
86, 176,
86, 88,
86, 88,
174, 174,
86, 88,
86, 0};
Now I need to send this through the IR LED. I have never written a program that can modulate a signal at this microsecond level. How would I do this?
-
3Use a library, like IRremote. Otherwise, you have to setup one of the pwm-timers to generate a 38kHz frequency, and then turn on and off this pwm based on the values you have captured above.Gerben– Gerben2015年03月30日 20:21:35 +00:00Commented Mar 30, 2015 at 20:21
2 Answers 2
Use the IRRemote library as mentioned and use the IRecord example. This will allow you to input a signal and then push a button which will send that signal from the infra-red LED on the arduino.
Please, take a look at Ken Shirrif's IRRemote library, as it is what you need. I used it in some project and worked better than other solutions that I coded.
-
I think that this is the one I am using, I am having a hard time finding good documentation for 'generic' IR signals (or RAW signals)Hoytman– Hoytman2015年03月31日 19:20:35 +00:00Commented Mar 31, 2015 at 19:20