Barry White Dimmable Light
2014-07-07
My first foray into Arduino development was to produce a musical lamp using several LEDs and a potentiometer connected to an Arduino Uno.
The microcontroller varies the number of LEDs that are illuminated as the potentiometer is adjusted. The Arduino also outputs the potentiometer reading to a Raspberry Pi (Model B) attached via USB using a serial connection. The Raspberry Pi runs a Python script utilising PySerial to listen to the output of the Arduino. The RPi then uses PyGames to play a WAV file (in this case Barry White's "Can't get enough") adjusting the volume with the potentiometer readings. As the lights go down the music comes up!