Step 4: Download the program

Here is the arduino code: /* By Daniel Solis Licensed under Creative Commons Attribution-ShareAlike 3.0 Unported http://creativecommons.org/licenses/by-sa/3.0/ You are able to modify this code as well as the ...

Step 2: Schematic

In the protoboard.
Arduino serial is 5v while iPod logic level is 3.3v. Because of it we need to add a voltage divider.
The two 1M ohm resistors are required to make a 500k to select the device.
The dectect cable is conected to iPod TX pin and use to let the arduino know when an ipod is conected.

Step 6: Place it in a box

Step 7: The thing finished

<p>This might be a bit much to ask but if you can show me how to make that with only a play button it would be much appreciated</p>

<p>In the code:</p><p>Why are some serial commands sent as bytes and some as hex? Does it matter which you use and when?</p><p>In the hardware:</p><p>I am also confused about which pins are coming out from the ipod. Could you specify?</p><p>Thanks</p>

<p>Hi! I am pretty sure its the same, hex and byte, I mean a number is a number, but I dont know if arduino does something else in the background depending on if its byte or hex. It would be interesting if you try it and see what you get, also, you can try using the Serial.write function. About the connections, there are only three wires between arduino and the dock: one is usually found as TX in the dock and it is connected to analog 4 pin, the second wire is usually found as RX in the dock and is attached to a voltage divider connected to arduino TX pin 1. The third wire is the ACCESORY INDICATOR, it has different names on different docks so you will need to find the pad it is connected to. You can do this with a continuity tester with one probe on pin 21 (of 30 pin ipod connector) and the other probe on each pad until yo have the closed circuit. Take a look at this site: <a href="http://pinouts.ru/PortableDevices/ipod_pinout.shtml" rel="nofollow">http://pinouts.ru/PortableDevices/ipod_pinout.shtm...</a></p><p>Thanks for your feedback and I hope this was useful.</p>

<p>Thanks for your quick feedback. Here's what I've tried. When I use Serial.print(mode2[p],HEX) I get the following output in my computers serial monitor:</p><p>FF553012FA</p><p>This is correct and corresponds to the data we are trying to send. When I use Serial.print(mode2[p],BYTE) it gives me an error that this command does not work in the latest version and I should use serial.write if I want to send bytes. So I tried Serial.write(mode2[p]) and I got the following in my Serial Monitor:</p><p>&yuml;U &uacute;</p><p>This is surprisingly also correct and represents the same thing when using this translation code that I found on the internet <a href="http://www.december.com/html/spec/codes.html." rel="nofollow">http://www.december.com/html/spec/codes.html.</a></p><p>I guess my main question about it is, did your program work just as above when you used both hex and byte and also, why did you choose to send some as hex and some as byte.</p><p>As far as the wires go, would it be possible to send these commands through a usb instead of using the dock? This would mean sending the commands through pins 25 and 27 (usb data + and usb data -) rather than pins 12 and 13 (Tx and Rx). Have you tried or thought about this?</p><p>Finally, can you confirm that I understand the wiring scheme. From your diagram it looks like the grey wire goes to ipod Rx, the brown wire is the accessory indicator and it's purpose is to tell the ipod that we will be communicating through Rx and Tx, and the light blue wire is ipod Tx. There is then a 4th wire, dark blue, and I'm guessing that just connects to the ipod docks ground. Is this all correct?</p><p>And finally finally, does any ipod dock work or do different docks have different pins on them. Will a simple charging dock work or does it need to be a dock that is meant for controlling your ipod?</p><p>Sorry for the essay and thanks for your last response and for putting together this entire project!</p>

This is great thanks! <br> <br>Only question I have is on the page showing the schematic... Which pins are all those wires coming from on the Ipod? <br> <br>Some are fairly evident like the audio out left and right, but what's other pins you have connected to? <br> <br>Thanks

First of all, this is a fantastic project! <br> <br>Though I was wondering, do you think this could be done with an Arduino Lilypad? I have one lying around and would like to use it, but since it is quite a bit simpler than the UNO I wasn't sure.

Yes you can. I have no experience with lilipad but basically everything stays the same. All you have to do is change the pin numbers in the code so they match the physical conection. Remeber you only need three pins of the arduino (two analog pins and the serial transmitting pin). the biggest change would be the Tx pin which is located on the pin header of the lilypad. I hope this information helps you, if you have another question just ask.

Nice one!<br><br>You could add some info/notes to your fritzing layout to show which value resistors are used where. As displayed the image is too small to make out the colour bands. Also with careful selection of resistor values you make the analog readings for each button further apart, so there is less chance of the arduino getting the button reading wrong if there is a bit of stray resistance.<br><br>I have a little breakout board that I want to use for the same thing - your code will be a great kicking off point. <br><br>I was hoping to not only control the playback (it's ridiculous that there is such an overhead for sending next / back / vol up / vol down) but also to get song title, artist title etc. for displaying on a little LED screen.<br><br><br>

Sorry, there are the resistor values. Of course you can get the song name, artis and lots of useful info. its not very difficult, but you need a logic level converter to receive the info. I had to buy it from sparkfun, if i get the thing before the contest closes maybe i can upload the instructable.