Payam Mohajeri
Payam Mohajeri

Reputation: 164

Sending Data through Headphone jack in Android phones

I'm currently dealing with a new project and I have to send data through headphone jack with specific voltage, then i can work on that voltage.

so here i need to program the specific voltage depends on my data. is it possible that i can access the output voltage of headphones in android and then create a application to control that voltage?

Upvotes: 14

Views: 39479

Answers (4)

user3704718
user3704718

Reputation: 1

you could maybe try turning your data into binary for example when your listening to music your head phone jack changes +- vibrating to make a sound so you could make +- = 0 and -+ = 1

Upvotes: 0

davehale23
davehale23

Reputation: 4372

Here is a HackADay article dealing with this issue. http://hackaday.com/2010/02/01/android-audio-serial-connection/ It offers working code which was quite a bit simpler than I thought it would be.

Although, like others have suggested, including this very similar SO post, you might have an easier time using the USB port.

Upvotes: 8

Rizwan
Rizwan

Reputation: 118

the simplest way to catch input data from audio jack in android or iphone is through recording http://developer.android.com/reference/android/media/AudioRecord.html

think something similar like playing a linear pcm audio file , I have n't tried but I believe it should work

Upvotes: 4

Chad
Chad

Reputation: 892

I believe you will have to dive deep into Assembly type language, however, why the headphone jack? As I understand it, only reverberations and sound are transmittable through the headphone jack. I believe it would be more feasiable to output voltage through the Mini-USB port.

I think this site may be of some help regarding my method:

http://pinouts.ru/Slots/USB_pinout.shtml

Upvotes: 0

Related Questions