I am looking for a way to read raw data that is being sent from the Arduino through iPhone's audio jack.
I searched a lot and found this which detects whether a jack plug is connected or not but couldn't find any code to read the raw data.
Any help in this regard will be greatly appreciated!
Thanks.
If the bandwidth of the incoming signal fits into the bandwidth of the iPhone's A/D converter (± 20Hz to 20kHz) you can read it.
You'll need audio jack to audio jack cable with Tip/Ring1/Ring2/Sleeve pinout (Balanced plug on the picture) on both sides (Tip/Ring/Sleeve (Conventional stereo plug) won't work).
The incoming signal will be analogue
so you'll need to convert it (through Frequency-shift keying
modem) to digital
, this modem library should do the trick (I've used it to convert into digital, unfortunately I do not have my old project to share but it's tested):
https://github.com/jensmeder/FSKModem https://en.wikipedia.org/wiki/Frequency-shift_keying
Also take a look at this lib (Did you try it? Maybe it will help better in your case):
https://github.com/billhsu/jackDuino
Also check this out (Audio Jack Modem for iPhone):
https://www.sparkfun.com/products/retired/10331
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With