Streaming duration?

Discussion about my Wifi Radio project at http://mightyohm.com/wifiradio/ or my WL-520gU talk at NOTACON.
Post Reply
sail4sea
Posts: 11
Joined: Sat Mar 05, 2011 11:33 pm

Streaming duration?

Post by sail4sea »

I plan on building the radio as you set it out on your tutorial. I am curious. Does the router continuously download music or do I have to turn it off to make it stop playing music. I don't want to consume bandwidth when I am not using it.

I managed to get the serial header soldered on and I will be flashing the router when I get an FTDI cable. It and my chip programmer are coming together, hopefully soon.
User avatar
mightyohm
Site Admin
Posts: 1064
Joined: Fri Apr 03, 2009 10:29 pm
Location: Seattle, WA
Contact:

Re: Streaming duration?

Post by mightyohm »

It plays continuously, like a radio.
To stop it, turn it off.
(Or add a stop button, or log in and run 'mpc stop', etc.)
User avatar
gerben
Posts: 164
Joined: Sat Oct 16, 2010 8:41 am
Location: Netherlands

Re: Streaming duration?

Post by gerben »

You could even program a sleep function. So if you haven't changed stations or volume etc. it will stop playing after say 1 hour.
I did this myself. Every time I change channels I touch a file. Then I have a cronjob running every 5 min checking if the files modification time is more than 1 hour ago. If so it will run mpc stop.
Code can be found in viewtopic.php?f=2&t=247

Good luck
sail4sea
Posts: 11
Joined: Sat Mar 05, 2011 11:33 pm

Re: Streaming duration?

Post by sail4sea »

I need to change the code to add a digital input which I would control with a switch. I have never done AVR programming before. Although, I know C, I had trouble understanding the code in step eight. I would like to add another control and I am not sure which line to use or how to program the chip to even read another line. Could you point me to some tutorials that would help me figure out what is going on? I may end up having to breadboard a bunch of intermediate circuits and reprogram the AVR over and over again to practice.

Will the code in the example run on the Atmel 328? THe 168 wasn't available and both chips share the same datasheet.
User avatar
mightyohm
Site Admin
Posts: 1064
Joined: Fri Apr 03, 2009 10:29 pm
Location: Seattle, WA
Contact:

Re: Streaming duration?

Post by mightyohm »

I'm writing a book about this, but it won't be available for a few more months.

Your best bet would be to read the datasheet and look for some other code examples online, or replace the display circuit with something like an Arduino, which is easier to learn. There are a few Arduino examples in this forum.

The code should work pretty much as-is on the ATmega328, there might be some minor changes to the Makefile to get it to run on the 328P, but maybe not. I haven't tested this so I can't be sure.

I can help if you ask specific questions, but it has been a while since I looked at the code so it might take me a little bit to get back up to speed.
Post Reply