如何读取/使用Android设备的3.5毫米耳机插孔发送数据? [英] How to read/send data using the Android Devices 3.5mm headset jack?

查看:406
本文介绍了如何读取/使用Android设备的3.5毫米耳机插孔发送数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是跌跌撞撞周围EE堆栈,发现这个帖子:<一href="http://electronics.stackexchange.com/questions/12498/what-protocol-does-a-headphone-jack-use">What协议做了耳机插孔的使用。以及它引发了一些好奇的我,我的身影,<一个href="http://www.creativedistraction.com/demos/sensor-data-to-iphone-through-the-headphone-jack-using-arduino/">if iPhone的可以做到这一点,我想也是如此。

I was just stumbling around EE Stack and found this post: What protocol does a headphone jack use. And it sparked some curiosity in me, and I figure, if the iPhone can do it, I want to as well.

有没有人知道的,现在正在做这件事的任何项目或是否甚至有可能?

Does any one know of any projects that are doing this now or whether or not it's even possible?

推荐答案

你基本上是问如何将麦克风输入到调制解调器的输入。这个聪明的技术的一个变体是由广场对iOS和Android设备的磁条阅读器。

You are basically asking how to turn the microphone input into a modem input. A variant of this clever technique is used commercially by Square for their magstripe readers on both iOS and Android devices.

要做到这一点,需要获得访问来自Android的原始PCM流和输入解码。幸运的是,有人已经做到了,丢源在那里。请参见这乱砍日有关项目样品的Arduino和Android $ C $下只是发送。

To do so requires getting access to the raw PCM stream from Android and decoding the input. Luckily for you, someone has already done it and thrown the source out there. See this Hack a Day linked project for sample Arduino and Android code for transmitting only.

我找不到例如安卓code到的接收的,但也有在做FSK与iOS中的this Arduino的论坛帖子

I couldn't find example Android code to receive, but there are rather extensive notes on doing FSK with iOS in this Arduino forum post.

(虽然这不是你的问题,一个简单的方法来获取数据和输出的Andr​​oid设备是新的 USB主机和配件的支持。它需要一个新望手机和操作系统,因此不够灵活的音频路由。)

(Though it wasn't your question, an easier way to get data in and out of an Android device is the new USB Host and Accessory support. It requires a newish phone and OS, so not as flexible as the audio route.)

这篇关于如何读取/使用Android设备的3.5毫米耳机插孔发送数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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