Very simple Raspberry Pi Radio
Posted: Sat Dec 08, 2012 4:13 am
Hello Everybody,
as my NSLU2/Arduino based radio broke down after some month of operation, I now wanted to build something more simple and stable. (no extra microcontroller, as few as possible electric parts and wires ...)
I bought myself a Raspberry Pi; with the following command line command you declare two of the gpio pins to be input pins:
Connect two push button to those two pins; with the following command you test the buttons's state:
So when BUTTON is pressed, the next station in the playlist will be played. BUTTON1 plays the previous station.
Pressing both together restarts mpd.
RaspRadio works like a charm with more than 30 stations in the list.
The only thing I will still add is a led to signal the station number that is currently playing.
http://www.flickr.com/photos/rigasw/set ... 507768131/
Schwabinger
as my NSLU2/Arduino based radio broke down after some month of operation, I now wanted to build something more simple and stable. (no extra microcontroller, as few as possible electric parts and wires ...)
I bought myself a Raspberry Pi; with the following command line command you declare two of the gpio pins to be input pins:
Code: Select all
echo "15" > /sys/class/gpio/export
echo "in" > /sys/class/gpio/gpio15/direction
echo "7" > /sys/class/gpio/export
echo "in" > /sys/class/gpio/gpio7/direction
Code: Select all
BUTTON=$(cat /sys/class/gpio/gpio7/value)
BUTTON1=$(cat /sys/class/gpio/gpio15/value)
Pressing both together restarts mpd.
RaspRadio works like a charm with more than 30 stations in the list.
The only thing I will still add is a led to signal the station number that is currently playing.
http://www.flickr.com/photos/rigasw/set ... 507768131/
Schwabinger