Search code examples
iphoneinfrared

Send IR signals iPhone


I would develop an App to control some IR receivers from my iPhone.
I used Arduino to detect the values of some command from a remote, and now I have something like this:

ON
1250, 450, 1200, 450, 350, 1300, 1250, 450, 1200, 450, 400, 1300, 350, 1300, 350, 1300, 400, 1300, 350, 1300, 1200, 450, 350

OFF
1150, 550, 1150, 500, 350, 1300, 1150, 550, 1150, 500, 300, 1350, 350, 1300, 400, 1300, 350, 1300, 350, 1350, 350, 1300, 1200

I have build a transmitter based on jack 3.5, so now a would send this values through the jack of iPhone.

How can I do it? Is there some library or framework in Swift or Objective-C that can help me?

In App Store there is an App called "Tv Remote" that does effectively what I want, and It works very well with my Samsung TV, but It has its database of values and only for some Tv. So now I would like develop an app like that to control my electric fun or my led stripe or other. Can you give me some advice please?


Solution

  • You can read any data through the iPhone's headjack, if the bandwidth of the signal fits into the bandwidth of the iPhone's A/D-converter, which is about 20Hz to 20kHz.

    Also look at this project: https://code.google.com/p/hijack-main/

    Basically it describes hijacking power and bandwidth from the mobile phone's audio interface. Creating a cubic-inch peripheral sensor ecosystem for the mobile phone.

    The incoming data must be modulated at frequencies within the passband of the iPhone microphone input. Although many have suggested that this limits the data rate, in fact 19 kHz audio is a very wideband signal, capable of dozens of kilobits per second.

    There's also the following library: http://www.crudebyte.com/jack-ios/sdk/

    Sources: iPhone headphone jack - read in data?