Mr. Oyvind from Oslo made a cool hack of a 75-years-old radio into an iPhone dock using an Arduino.
“ The Arduino is used to read the state of the dual potentiometer that controls the volume and then translate this value into a certain number of LEDs being lit on the volume indicator.
I am using a dual potentiometer (2 pots in one). Here you can see one pot connected to the amplifier on the left to control the volume, and the other connected to the Arduino on the right to read the position of the pot.
Here you can see the 4 wires used to control the volume display connected to digital input 2, 3, 4 and 5 on the left side of the board. And you can see the potentiometer connected to 3.3V, analog input 0 and ground on the right side of the board.”
The code for the project is very simple and can be found here.
You can read the complete tutorial or download the code On his website.