Day & Night Sampler - a raspberry pi mpd mini boombox: Part 2 Software Installation
See Part 1, Parts List
If you are using a WiFi adapter based that uses the 8192cu kernel module (Realtek chipsets) see the fix for occasional dropouts documented on Adafruit.
d = feedparser.parse('http://www.wunderground.com/auto/rss_full/CA/Pleasant_Hill.xml') # Change to your local area
NOTE: This is not using the API for wunderground, for which you need to get an API key
Contiune to Part 3, Configure MPD Player
To get started building the boombox software from scratch, complete the following steps:
- Prepare your SD card and raspberry pi using the tutorial from the excellent Adafruit Learning System by Dr. Simon Monk. We will use the Raspbian 2014-01-07 Wheezy Debian distribution.
- Start with Lesson 1 (http://learn.adafruit.com/adafruit-raspberry-pi-lesson-1-preparing-and-sd-card-for-your-raspberry-pi) and continue through Lesson 6 (http://learn.adafruit.com/adafruits-raspberry-pi-lesson-6-using-ssh)
- You need some software not covered in Lessons 1 -6 in the Adafruit Learning System:
- sudo apt-get install python-pip [easy install for other modules]
- sudo pip install pyserial
- sudo pip install feedparser [for parsing weather info and other RSS feeds]
- sudo apt-get install python-dev
- sudo pip install spidev
- To get mpd music player and sound working, and allow python to work as an mpd client, you'll need to install:
- sudo apt-get install alsa-base alsa-tools alsa-oss alsa-utils
- sudo apt-get install mpd mpc
- sudo apt-get install python-mpd
- For the python LIRC client pylirc to work :
- sudo apt-get install liblircclient-dev
- sudo pip install pylirc2
- Install the IR Remote Control software by following Dr. Monk's guide on the Adafruit Learning System: http://learn.adafruit.com/using-an-ir-remote-with-a-raspberry-pi-media-center/lirc
- We're using stock Raspbian Wheezy 2014-01-07 for our boombox; Dr. Monk is using XBMC. These changes are necessary:
- skip the link about setting up your raspberry pi as a media center, in the Overview section
- in the step labelled "LIRC", you can skip the "disable" of Enable GPIO TSOP IR Receiver as this is for the XBMC distribution
- We're using stock Raspbian Wheezy 2014-01-07 for our boombox; Dr. Monk is using XBMC. These changes are necessary:
- Install the audio support for a USB Sound dongle.
- Follow the instructions on Adafruit Learning System for this install (http://learn.adafruit.com/usb-audio-cards-with-a-raspberry-pi/instructions)
- I used a generic CMedia-based USB sound device. This will NOT show a CM108/CM109 chipset in dmesg, just CMedia
- The essential steps from this tutorial is the firmware update:
- sudo apt-get install git-core
sudo wget https://raw.github.com/Hexxeh/rpi-update/master/rpi-update -O /usr/bin/rpi-update
sudo chmod +x /usr/bin/rpi-update
sudo BRANCH=next rpi-update
sudo reboot
- sudo apt-get install git-core
- update the /etc/modprobe.d/alsa-base.conf as indicated in the tutorial
If you are using a WiFi adapter based that uses the 8192cu kernel module (Realtek chipsets) see the fix for occasional dropouts documented on Adafruit.
- Install the python scripts in /home/pi
- Save the rpi_boombox_init.sh script in a directory of your choice; instructions for installing this script are on this page
- To configure the weather display in rpi_boombox.py:
- change the following for your locality
d = feedparser.parse('http://www.wunderground.com/auto/rss_full/CA/Pleasant_Hill.xml') # Change to your local area
NOTE: This is not using the API for wunderground, for which you need to get an API key
FYI you missed a package somewhere in there, someplace before spidev you need python-dev or the install will fail...
ReplyDeleteUpdated. Thanks, I always miss something, no matter how careful I am!
Delete