通过iPhone音频插孔读取数据 [英] Read data through iPhone audio jack

查看:162
本文介绍了通过iPhone音频插孔读取数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一种方法来读取从Arduino通过iPhone的音频插孔发送的原始数据。



我搜索了很多,发现



输入信号将为 analogue 所以你需要将它(通过频移键控调制解调器)转换为 digital ,这个调制解调器库应该做的伎俩(我用它转换成数字,不幸的是我没有我的旧项目分享,但它已经过测试):



< a href =https://github.com/jensmeder/FSKModem =nofollow noreferrer> https://github.com/jensmeder/FSKModem
https://en.wikipedia.org/wiki/Frequency-shift_keying



另外看看这个lib(你试过吗?也许它会对你的情况有所帮助):



https ://github.com/billhsu/jackDuino



同时检查一下(适用于iPhone的音频插孔调制解调器):



https://www.sparkfun.com/products/retired/10331


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

这篇关于通过iPhone音频插孔读取数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆