Had a couple of good ideas yesterday, firstly to control the track playing and have a pause and play button through the function pin on the 3.5mm jack. This works in very much the same way as a headset with buttons. Then due to this idea, I decided I may as well try and hack the old ir remote from the speaker dock. This was very easy, after downloading the ir library for arduino, and attaching an ir sensor I was able to record the codes for each button press and write a simple piece of code to print the button on the serial monitor. Then I started looking
round for a 3.5mm cable through which I could breakout the function pin. Surprisingly I found one with an old nokia brick phone, after dissmanteling the button and mic I soldered on a SIL and started messing round with it. At first I had no luck with the function button which literally grounded the function pin throuh a switch. However then I realised the mic would offer some resistanve normally, so I measured the resistanc of my HTC headphones. It measured 800 ohms so I set up a variable resistor in its place. Succes! I can now control the track and play pause on any compatible device. Next stage is to buy a digital potentiometer to allow me to control the volume and the remote will be fully functional.