Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: airman00 on January 25, 2008, 07:33:13 AM

Title: Using sound output for robots
Post by: airman00 on January 25, 2008, 07:33:13 AM
Another idea that hit me
If you don't want /can't use the serial/ parallel / or USB of a computer ,  you can send outputs to your robot using the headdphone jack. This would have to be a certain pulse width for the microcontroller to understand it though...

Or even if you have a  mp3 player you could record a "sound" that is played to the headphone wire, can be connected to a MCU and then the robot can do a simple task repetitively.

Just an idea.....    8)
Title: Re: Using sound output for robots
Post by: Admin on January 25, 2008, 09:41:56 AM
Any ideas on how to turn a datafile into an mp3?
Title: Re: Using sound output for robots
Post by: airman00 on January 25, 2008, 09:45:05 AM
Any ideas on how to turn a datafile into an mp3?

lol , no idea whatsoever 

also im guessing the data output would have to be square waves for the MCU , right?
Title: Re: Using sound output for robots
Post by: dunk on January 25, 2008, 11:38:56 AM
Quote
Any ideas on how to turn a datafile into an mp3?
the simplest way i can think of is to feed the data stream into the microphone port and record.
there has to be a nice software way as well though.


dunk.
Title: Re: Using sound output for robots
Post by: Maltaeron on January 25, 2008, 06:15:33 PM
I don't think you could use an mp3, maybe some sort of compressed wav file, lossy compression doesn't seem like the kind to use for data... lol
Title: Re: Using sound output for robots
Post by: Admin on January 25, 2008, 07:40:51 PM
yea I realized right after I posted it that mp3 wouldn't work . . . the compression will just filter out anything that high of a frequency . . .
Title: Re: Using sound output for robots
Post by: airman00 on January 26, 2008, 08:44:41 PM
well anyone know of a program that does this

or perhaps someone would like to create this program  ;)
Title: Re: Using sound output for robots
Post by: paulstreats on January 27, 2008, 06:58:27 AM
After creating the hex data file that you want to send, rename it as a .raw file. There are many sound programs that will convert the .raw file into other sound files such as wav and mp3.

The point about mp3 is true, even if you used a 0quality loss control the sound is still compressed.