コメントを削除: Ken Shirriff's blog
Giorgio: there are several reasons your sat decoder box may not respond. At the low level, it might be using a different modulation frequency than 38KHz, or a different IR wavelength. Higher level, it may be expecting more than just the played-back signal. For instance, RC5 alternates between two different codes, so simple playback won't work. Sony codes require the code to be transmitted at least twice. Your box may have its own strange requirements, such as different codes with particular timings. It could be the 50us resolution, but I've found that generally isn't a problem. More likely is IR sensors typically extend the on time and shrink the off time; my code tries to correct for this, but the correction factor could be different for your sensor. Unfortunately, there are a lot of variables to investigate. Also, try the circuit with your TV or stereo, to see if it works there. If you let me know what model satellite box you're trying to control, I could investigate a bit.
australopitecus: My code won't work with an Arduino mega as it has a different processor and the pins are all different. (Sorry I didn't mention that in my original article.) You could see if there's anything on PWM pin 9; I believe that's where the OC2B output connects on the mega. Probably you'll need to study the atmega 1280 datasheet and see how the PWM flags are different for the mega's processor, and change the code appropriately. Unfortunately I don't have a mega, so I can't try this myself.
Wolfgang: thanks for the code update.
2009/09/18 14:28:36
A Multi-Protocol Infrared Remote Library for the Arduino への投稿