ytai/ioio — pull request #25 by lanthaler (2012-06-05 10:45:33+00:00)
Title: Add support to IOIOLib and IOIO firmware to send infrared codes

This pull request adds the ability to send arbitrary infrared codes that are encoded in the [Pronto format](http://www.remotecentral.com/features/irdisp2.htm)

There's still a small bug in ir.c which required me to hardcode the carrier frequency. As soon as I use the one that's stored in ir_buffer, I get a duty cycle that's not 50% anymore. I couldn't find why the calculated pulse-width changed.

This is not the most efficient implementation, but I think a lot of people might be interested in it nevertheless. Things that should be improved:
* send infrared code as one "packet" by first sending the length of the infrared code and then the code at once (this should be a trivial change)
* transmit the infrared code by using a timer interrupt called every `pulse_width` microseconds instead of toggling the IR-LED output in a loop

Feel free to fork this PR and improve the things I listed above.