- Connect the speaker amplifier and AC-DC power converter according to the diagram shown below. Additionally, connect the Raspberry Pi and the WS2801 based LED strip to the +5VDC power supply as shown.
- Do not connect power to the micro USB connector, instead use a separate power supply. In my case I wasn’t able to boot up unless I used a 3A power supply. A 3A power supply may not be necessary, since I was running a full LED strip with 32 LEDs and a Raspberry Pi Model B. By using only two LED’s of a strip and a Raspberry Pi Model A you can probably use a smaller power supply with no problems. I used only 2 of the 32 available RGB LEDs. For my particular LED strip I cut off a section of the strip that’s 2 LEDs long. See the dotted cut lines on the LED strip shown in the Fritzing User Interface Schematic below. Additionally, you could use WS2801 Breakout boards(mentioned in the materials section) by connecting to SCLK/CKI and MOSI/SDI then daisy chaining CKO to the next WS2801 Breakout boards CKI and SDO to the next WS2801 Breakout boards SDI.
- Connect the Raspberry Pi as shown below in the Fritzing User Interface Schematic. (Click the image for a larger view.) The Raspberry Pi A and B rev 2.0 pinout is shown further below. Pin 1 is closest to the silk screened portion of the Raspberry Pi board that says ”Made in the UK”. Additionally, you will see a silkscreen P1 next to a notch that sticks out closest to pin 1. Lastly, the User Interface Schematic is shown for additional clarity with the various resistor values and pin labels that connect to the Raspberry Pi. **Note** Be sure to keep the 5V supply separate from the 3.3V supply. The 5V supply powers the board and the LEDs, while the 3.3V supply is provided by the Raspberry Pi and is used for all the pushbuttons and LEDs associated with the Raspberry Pi GPIOs.
- Once you are done, check you’re wiring to make sure you didn’t make any silly mistakes, or short anything out. Use plenty of electrical tape or heat shrink tubing as needed. Power up your Raspberry Pi, check for sparks or smoke, and make sure that all the electronic components are cool enough to touch without getting burned.
Once everything seems to be working as expected, test out the GPIO functionality by typing:
Take a look at the RGB LED strip. If it’s working properly then you should see a sequence of blinking LEDs. If it’s not working then go back and check your wiring.
From there you can test out the GPIO functionality by typing:
You should be able to press buttons and see the state change on the screen, as well as the LED should toggle. If it’s not working then go back and check your wiring.
If everything seems to be working then Connect one end of the 1/8 inch male stereo jack to the Raspberry Pi and the other end to your amplifier. Turn up the volume and type the following:
cd AlertsTube then
If everything is working as desired then you should hear a beep whenever a button is pressed. One button is responsible for toggling visual alerts on and off, another is responsible for fetching todays weather and telling you if any weather alerts are currently in progress, and the last button plays tomorrows weather forecast.
Download the alertsboot script and run it at startup:
Autostart the AlertsTube.py script by typing the following:
Then download the alertsboot script by typing:
sudo wget https://dl.dropbox.com/u/8170542/alertsboot then
sudo chmod 755 alertsboot
You can test the script by typing:
If you didn’t see any errors then you can proceed by typing:
sudo update-rc.d alertsboot defaults to have the startup script run at boot time.