I chose to build a remote-controlled Pandora Radio player as my final project. If you've read my page on my "Raspberry Pi 'Butler'" project, then that gives some context to this project, as this project built off of that one a bit.
The setup followed the diagram below. A user uses a TV remote to send commands, which are received by a microcontroller with an IR receiver connected to it's digital I/O pins. The microcontroller decodes the binary signal from the IR receiver, maps the message to a particular command or button sequence, and then sends command characters to the Raspberry Pi over serial UART communication. The Raspberry Pi runs a Python script, which constantly receives characters from the serial UART communication, and performs actions, such as starting Pianobar (the command-line Pandora player) as a subprocess, sending commands to the Pianobar subprocess, and performing text-to-speech narration of channel options.
- Turn Pandora on/off
- Pause/Play
- Increase/Decrease Volume
- Skip Song
- Dislike Song
- Enter Station Number
- Clear Station Number
- Read Station Directory Aloud
Here's a video of it working:
Some of the code I used on the microcontroller and the Raspberry Pi, as well as my presentation slides, and a PDF manual of the remote/IR receiver are up in a GitHub repo here.
It was a lot of fun to hack around with this project. I love listening to Pandora Radio and having this in my room for a few weeks and being able to control everything with a TV remote was really cool!
It was a lot of fun to hack around with this project. I love listening to Pandora Radio and having this in my room for a few weeks and being able to control everything with a TV remote was really cool!

No comments:
Post a Comment