I love making smart hardware. Most of my hardware ideas need to communicate with iPhone via the headphone jack. I am building an open-source library for headphone jack communication.
What it does
It controls three channels, L, R and Mic. L generates FSK waves for output, Mic receives FSK waves for input, and R generates sine waves for energy output, which means offering power for external accessories.
How I built it
I coded in plain Swift. I cut of a pair of headphones, got the pins laid out on the breadboard, and used oscilloscopes to test the output from iPhone. And I used Arduino to test data transmission.
Challenges I ran into
Figure out Apple's AudioToolbox APIs to use with Swift. It's very, very old.
Accomplishments that I'm proud of
The interface is nice and simple. Everybody now can build an accessory with headphone jack communication.
What I learned
Communication protocol, frequency-shift keying
What's next for Infraudio
Refining the library for easier use, simpler interface, so that developers do not need to know anything about the old AudioToolbox APIs to make a headphone jack hardware!