Very simple Raspberry Pi Radio

Discussion about my Wifi Radio project at http://mightyohm.com/wifiradio/ or my WL-520gU talk at NOTACON.
User avatar
gerben
Posts: 164
Joined: Sat Oct 16, 2010 8:41 am
Location: Netherlands

Re: Very simple Raspberry Pi Radio

Post by gerben » Mon Dec 17, 2012 5:32 am

I just winged it.

Looking at it now 2.2K combined with the 3.3V would result in 1.5mA of current. Which is way below the max of 16mA the raspberry can handle. So it seems I guesstimated correctly.

Schwabinger
Posts: 49
Joined: Sat Dec 04, 2010 12:04 am
Location: Munich, Germany

Re: Very simple Raspberry Pi Radio

Post by Schwabinger » Mon Dec 17, 2012 2:40 pm

Hi everything went smoothly! I am almost there!

I used gpio pin 17 and 18.
Keys on the remote were recognised and learnded by the program.

The test program, where I see the names of the pressed keys on the screen, works as well.

But the program to play stations from the playlist does not work ...

In which directory do I have to store .lircrc?
I started irexec as deamon; I did not receive an error message, but when I do a "ps -ef | grep -i irexec" nothing is found ...

Any ideas?

THANK you so much!

User avatar
gerben
Posts: 164
Joined: Sat Oct 16, 2010 8:41 am
Location: Netherlands

Re: Very simple Raspberry Pi Radio

Post by gerben » Tue Dec 18, 2012 8:11 am

Great. Seems like the hardware is working.
~/.lircrc
So in your home directory (/home/pi).

If irexec can't find the file, it will exit immediately. I just tested it on my pi.

Schwabinger
Posts: 49
Joined: Sat Dec 04, 2010 12:04 am
Location: Munich, Germany

Re: Very simple Raspberry Pi Radio

Post by Schwabinger » Tue Dec 18, 2012 9:56 am

Works perfectly well!

Thank you soooo much for your great support!

Greetings from Munich,

Schwabinger

User avatar
gerben
Posts: 164
Joined: Sat Oct 16, 2010 8:41 am
Location: Netherlands

Re: Very simple Raspberry Pi Radio

Post by gerben » Tue Dec 18, 2012 10:02 am

I'm happy for you. Glad I could help.

Guten weihnachten from your neighbor (the Netherlands) :-)

Schwabinger
Posts: 49
Joined: Sat Dec 04, 2010 12:04 am
Location: Munich, Germany

Re: Very simple Raspberry Pi Radio

Post by Schwabinger » Wed Dec 26, 2012 3:16 am

Using lirc seems to be a great approach. Here some features that I have implemented so far:

- Jump to first, last, next, prev station in tunerlist.
- volume control
- pause
- restart mpd service
- reboot raspradio
- shutdown raspradio
- print list of stations (had to install cups on raspberry)
- make the leds (I have two now) signal the station number that is playing
- load different playlists and play mp3 files that are hosted on my nas-device (nslu2 ,connected via nfs)

As gerben predicted: the buttons on my breadboard had to go ....

User avatar
gerben
Posts: 164
Joined: Sat Oct 16, 2010 8:41 am
Location: Netherlands

Re: Very simple Raspberry Pi Radio

Post by gerben » Wed Dec 26, 2012 12:38 pm

Looks great. Thanks for sharing.

One thing I did was, have the is broadcast (wall) the output of mpc to all terminals, when I press a button. This way, when my tv is on, I can see what is playing. I even looked into writing directly to the framebuffer, to show some album-art. But since I haven't used the text-only version a lot, it seems like a wast of time.

MP3-file playback is also on my wishlist. Do you have any pointers about how to add an entire collection of mp3's (mostly complete albums)? I think it would be ideal to have the ability to jump to the next album or something, but I'm not sure.

Schwabinger
Posts: 49
Joined: Sat Dec 04, 2010 12:04 am
Location: Munich, Germany

Re: Very simple Raspberry Pi Radio

Post by Schwabinger » Thu Dec 27, 2012 12:29 pm

The number of albums I want to make available via my RaspRadio is limited (< 100).

So for every album I built an extra playlist using something like

mpc clear
mpc search any "Rostropovich" | mpc add
.. some playlist editing with mpc del or mpc add. And finally:
mpc save Bach_Cello_Suiten_Rostropovich

Then I append the following to .lircrc (I use a bash-script to do that)

Code: Select all

begin
prog = irexec
button = stop
button = 0
button = 0
button = 2
button = 6
button = stop
config = mpc clear; mpc load Bach_Cello_Suiten_Rostropovich
end
To play that album I have to press <stop> 0 0 2 6 <stop> on my remote .... and then <play>
As the album's playlist is now selected, with the next or prev button I can select the piece that I want to listen to.

Using that numbering scheme I could insert up to 10.000 albums ....

User avatar
gerben
Posts: 164
Joined: Sat Oct 16, 2010 8:41 am
Location: Netherlands

Re: Very simple Raspberry Pi Radio

Post by gerben » Fri Dec 28, 2012 8:54 am

Wouw. I didn't know IRexec could do sequences. That could be pretty useful. Thanks for sharing your way of adding albums. Since all my albums are in a separate folder, I would probably write so code to automatically load next folder, or something.

Schwabinger
Posts: 49
Joined: Sat Dec 04, 2010 12:04 am
Location: Munich, Germany

Re: Very simple Raspberry Pi Radio

Post by Schwabinger » Sun Jan 13, 2013 6:47 am

At the moment the radio is moving into it's own box.

Here a photo when it still was running on a breadboard:

http://www.flickr.com/photos/rigasw/8375777453/

Post Reply