Arduino Volume Changer

The program is subdivided in two talking parts: the first, in C, reads a potentiometer installed on the Arduino board and via-serialport tells the other part, a python script, the current volume level. Then the python script calls aumix to set the audio card volume.

The code

All the code is under GPL, and you can get it from http://shared.hackzine.org/progetti/arduino/volumeChanger_20081003-025910.tbz2. The volumeChanger.pde file is the arduino program source code, and pyclient/volumeChanger_pyclient.py is the python script to run on the host machine. To talk on serial port with python you'll need the module pyserial installed.

The Hardware

The hardware configuration is quite simple: a potentiometer is plugged on arduino as follows:

  • PIN1 → Vcc
  • PIN2 → ANALOG0
  • PIN3 → Ground
 
Translations of this page:
projects/arduino/volume_changer.txt · Last modified: 2008/10/02 18:23 by redshadow
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki