Hello everyone, I've had a full-on Android day today
I got sidetracked looking to find code examples about reverse geolocation... and found some details about the play/pause button on the headphones.
According to some poking around with a spare headset and a multimeter I discovered that there is a means of captureing data from external devices via the TRRS plug/jack.
I've discovered that the standard media player responds to 4 states:
1. Nothing, no presses, voltage on ring2 connector is 2.6 volts.
2. Forward/next track, voltage on ring 2 is around 0.5 volts.
3. Back/previous track, voltage is around 0.18 ~ 0.20 volts.
4. Play/pause, ring 2 is at 0 volts.
I have made a circuit that replicates these voltages, simply by switching output pins to resistors and i'd like to capture these 4 states as a simple data logger.
Basically the end goal is to update an old weather monitoring project so the data on the eeprom is simply sent using the headphone socket connection so save me from having to dismantle the weather proof housing, extract the chip to go into the reader, and all the reverse.
Has anyone got any code samples that could guide me in the right direction.
As you may guess im more at home with a soldering iron and PIC assembly code than Java, but I'm finding more and more reasons to keep on the learning curve .
Thanks for any help,
GIR
I got sidetracked looking to find code examples about reverse geolocation... and found some details about the play/pause button on the headphones.
According to some poking around with a spare headset and a multimeter I discovered that there is a means of captureing data from external devices via the TRRS plug/jack.
I've discovered that the standard media player responds to 4 states:
1. Nothing, no presses, voltage on ring2 connector is 2.6 volts.
2. Forward/next track, voltage on ring 2 is around 0.5 volts.
3. Back/previous track, voltage is around 0.18 ~ 0.20 volts.
4. Play/pause, ring 2 is at 0 volts.
I have made a circuit that replicates these voltages, simply by switching output pins to resistors and i'd like to capture these 4 states as a simple data logger.
Basically the end goal is to update an old weather monitoring project so the data on the eeprom is simply sent using the headphone socket connection so save me from having to dismantle the weather proof housing, extract the chip to go into the reader, and all the reverse.
Has anyone got any code samples that could guide me in the right direction.
As you may guess im more at home with a soldering iron and PIC assembly code than Java, but I'm finding more and more reasons to keep on the learning curve .
Thanks for any help,
GIR