Page 2 of 5

Re: Very simple Raspberry Pi Radio

Posted: Mon Dec 17, 2012 5:32 am
by gerben
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.

Re: Very simple Raspberry Pi Radio

Posted: Mon Dec 17, 2012 2:40 pm
by Schwabinger
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!

Re: Very simple Raspberry Pi Radio

Posted: Tue Dec 18, 2012 8:11 am
by gerben
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.

Re: Very simple Raspberry Pi Radio

Posted: Tue Dec 18, 2012 9:56 am
by Schwabinger
Works perfectly well!

Thank you soooo much for your great support!

Greetings from Munich,

Schwabinger

Re: Very simple Raspberry Pi Radio

Posted: Tue Dec 18, 2012 10:02 am
by gerben
I'm happy for you. Glad I could help.

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

Re: Very simple Raspberry Pi Radio

Posted: Wed Dec 26, 2012 3:16 am
by Schwabinger
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 ....

Re: Very simple Raspberry Pi Radio

Posted: Wed Dec 26, 2012 12:38 pm
by gerben
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.

Re: Very simple Raspberry Pi Radio

Posted: Thu Dec 27, 2012 12:29 pm
by Schwabinger
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 ....

Re: Very simple Raspberry Pi Radio

Posted: Fri Dec 28, 2012 8:54 am
by gerben
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.

Re: Very simple Raspberry Pi Radio

Posted: Sun Jan 13, 2013 6:47 am
by Schwabinger
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/