There’s not much to it:
- Raspberry Pi Model B+ running Raspbian Jessie Lite
- USB numeric keypad with sticky labels
- Behringer UCA202 USB Audio Interface (replacing the Creative Labs gadget)
- USB WiFi dongle (in power hog mode) on a short extension cable for better reception
As much hardware doc as you need:
The green plug leads off to a set of decent-quality PC speakers with far more bass drive than seems absolutely necessary in this context. The usual eBay vendor bungled an order for the adapter between the RCA line-out jacks and the 3.5 mm plug that will avoid driving the speakers from the UCA202’s headphone monitor output; I doubt that will make any audible difference. If you need an adapter with XLR female to 1/4 inch mono, let me know…
The keypad labels provide all the UI documentation there is:
The Python source code as a GitHub Gist:
Media dictionary relates keycodes with the command line parameters required to fire
mplayer at the streaming stations. With that running, the
Controls dictionary turns keycodes into
mplayer keyboard controls.
There’s no display: you have no idea what’s going on. I must start the program manually through an
ssh session and can watch
mplayer‘s console output.
Halt button forcibly halts the RPi, after which you squeeze the Reset button to reboot the thing. There’s no indication that it’s running, other than sound coming out of the speakers, and no way to tell it fell of the rails other than through the
The loop blocks on events, so it can’t also extract stream titles from the (not yet implemented) mplayer stdout pipe / file and paste them on the (missing) display; that’s gotta go.
There’s a lot not to like about all that, of course, but it’s in the tradition of getting something working to discover how it fails and, in this case, how it sounds, which is even more important.