Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )



Advanced DNS Management
New ZoneEdit. New Managment.

FREE DNS Is Back

Sign Up Now

adg0013
Posted on: Aug 1 2013, 11:38 AM


Whats this Lie-nix Thing?
*

Group: Members
Posts: 1
Joined: 1-August 13
Member No.: 18,435


I have been following multiple tutorials in an attempt to build a stand alone Pandora internet radio player using the Raspberry Pi. The Pi is running Wheezy, the latest distribution of Raspbian. All the tutorial are nearly identical when it comes to making pianobar and your bash script start at boot. Pianobar is the command line Pandora player and the bash script takes care of the button presses for next song, new station, volume up/down, pause/play, and shutdown/menu. I can get pianobar to start on boot, but the problem is the script: the buttons won't work. I have tried to solve this on my own for nearly an entire day and a half now, but am getting discouraged so I finally decided to ask others for help. I will post links for the tutorials and my code below. As of right now, I have pianobar and bash /home/pi/.config/pianobar/scripts/PandorasBox.sh added to the end of the ~/.bashrc file. I have tried adding the two lines to the /etc/rc.local file as well as the /etc/bashrc file. Nothing seems to work! One final thing: this is supposed to start playing music from Pandora by just applying power. Like I said before the music will work but the buttons will not. However, if I ssh into it and type ~/.bashrc and then quit pianobar, the buttons work!?

Here is the PandorasBox.sh script:
#!/bin/bash

gpio -g mode 22 in

if [ $(gpio -g read 22) = 1 ]
then
sudo python /home/pi/.config/pianobar/scripts/StartScreen.py
bash /home/pi/.config/pianobar/scripts/ButtonPiper.sh

fi

"http://www.instructables.com/id/Pandoras-Box-An-Internet-Radio-player-made-with/step8/Putting-it-Together-with-BASH-and-Python/"
"http://www.shaungehring.com/2013/01/03/raspberry-pi-project-1-pandora-streamer/comment-page-2/#comment-395"
"http://learn.adafruit.com/pi-wifi-radio/raspberry-pi-setup-3-of-3 "
  Forum: Programming in Linux · Post Preview: #33542 · Replies: 0 · Views: 4,991


New Posts  New Replies
No New Posts  No New Replies
Hot topic  Hot Topic (New)
No new  Hot Topic (No New)
Poll  Poll (New)
No new votes  Poll (No New)
Closed  Locked Topic
Moved  Moved Topic
 

RSS Lo-Fi Version Time is now: 20th November 2017 - 06:37 AM