Run It

On every boot, the sound module will need to be loaded and set to output to the 3.5mm audio jack:

sudo modprobe snd-bcm2835
sudo amixer cset numid=3 1

Next, play a mp3 file:

mpg321 <filename>

Leave the file playing and open a new terminal window or SSH connection to start the Python script:

sudo ./raspi-adc-pot.py
Now simply adjust the trim pot and you should hear the audio level change as the mp3 file is playing.
Last updated on 2015-05-04 at 04.25.41 PM Published on 2012-07-29 at 11.58.38 AM