Raspberery Pi Internet Radio

Moderators: adafruit_support_bill, adafruit

Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
kb4jhu
 
Posts: 14
Joined: Fri Jul 13, 2012 11:12 am

Re: Raspberery Pi Internet Radio

Post by kb4jhu »

I have completed the kit and all is working.

On power off (pressing the left button), the 30 second note is displayed on the LED screen, the sound is turned down, however the RPI never shuts down. I looked a the python code and looks like the shutdown command is not working. Can someone tell me how to fix so it shuts down correctly?

Great project. Enjoyed it so far and works great! :D

V/R

-Michael

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Raspberery Pi Internet Radio

Post by adafruit_support_rick »

Did you make the following change to the PiPhy.py code, as mentioned in the tutorial?

Code: Select all

HALT_ON_EXIT = True

kb4jhu
 
Posts: 14
Joined: Fri Jul 13, 2012 11:12 am

Re: Raspberery Pi Internet Radio

Post by kb4jhu »

Adafruit Support - Rick - Yes verified I have the code in place:

---------------------------------------------------------------
# Constants:
RGB_LCD = False # Set to 'True' if using color backlit LCD
HALT_ON_EXIT = True # Set to 'True' to shut down system when exiting
MAX_FPS = 6 if RGB_LCD else 4 # Limit screen refresh rate for legibility
VOL_MIN = -30
VOL_MAX = 5
VOL_DEFAULT = 0
HOLD_TIME = 3.0 # Time (seconds) to hold select button for shut down
PICKLEFILE = '/home/pi/.config/pianobar/state.p'

------------------------------------------------------------------------

I am running Raspbian Wheezy.

The shut down error I am getting is:

-----------------------------------------------------
PiPhi.pi line 378 in <module>
shutdown ()
File "PiPhi.py" , line 111, in shutdown
subprocess.call("sync")
NameError: global name 'subprocess' not defined

-------------------------------------------

Can you tell what I need to update to fix this error for proper shut down?

Thanks again for a super product. Enjoyed adafruit for offering this kit.

V/R

-Michael

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Raspberery Pi Internet Radio

Post by adafruit_support_rick »

Try executing PiPhy.py as superuser (i.e., with "sudo")

User avatar
donde
 
Posts: 192
Joined: Wed May 25, 2011 1:52 am

Re: Raspberery Pi Internet Radio

Post by donde »

I sure like my Raspberry Pi WiFi Radio. Just for fun I measured the power the device consumes with a Harbor Freight Power Meter. While playing wireless music I see 120 volts AC at 0.04 amps, and 3 watts. I'm using the Adafruit 5 volt, 1 amp PS. I guess running the little project 24/7 would not break the bank!

I want to thank Adafruit for sharing the coding for Pi and the LCD Pi Plate. I highly reccommend this project, but you should dedicate a Pi and LCD to the Radio if you want to keep it going.

donde

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Raspberery Pi Internet Radio

Post by adafruit_support_rick »

Thanks for posting! :D

kb4jhu
 
Posts: 14
Joined: Fri Jul 13, 2012 11:12 am

Re: Raspberery Pi Internet Radio

Post by kb4jhu »

Got mine working as well and shutting down correctly. Updated the rc.local with SUDO and working great.

This is a outstanding project for anyone. Easy to build, easy to get working and then hours of enjoyment! I will look for more projects like this one!

ADAFRUIT thanks for offering this kit. I have really enjoyed building and now using WiFi audio with my RPI!

- Michael KB4JHU

User avatar
donde
 
Posts: 192
Joined: Wed May 25, 2011 1:52 am

Re: Raspberery Pi Internet Radio

Post by donde »

Updated the rc.local
What did you do in rc.local? Mine shuts down, but doesn't kill power like a desktop would.

Don

Locked
Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/

Return to “Adafruit Raspberry Pi® accessories”