Go Down

Topic: Output Sound with 1/8'' Audio Stereo Jack PLEASE HELP NEED GUIDANCE (Read 690 times) previous topic - next topic

I_Got_Pi

Hello,

I am quite new to the arduino platform. I am trying to create an "air piano" with a ping sensor. The ping sensor reads the distance between your hand and the sensor, and converts it into sound. I am trying to output the sound to plug into headphones. To output the sound, I am trying to use a 1/8'' headphone stereo jack. Is there any way with the coding to output sound based on the data given from the ping sensor?

Thanks,

I_Got_Pi

LarryD

You could use Tone.
Frequency could be adjusted from your ping sensor distance calculations.

Syntax
tone(pin, frequency)
tone(pin, frequency, duration)

http://arduino.cc/en/Reference/Tone
http://arduino.cc/en/Tutorial/Tone
The way you have it in your schematic isn't the same as how you have it wired up!

I_Got_Pi

I know that, but I was also wondering about how to wire the 1/8'' jack. It is a female jack, with three pins from radio shack. Any ideas on how to wire it?

#3
Feb 21, 2013, 06:24 am Last Edit: Feb 21, 2013, 06:26 am by rockwallaby Reason: 1
Quote
I-Got_Pi wrote:
Is there any way with the coding to output sound based on the data given from the ping sensor?


If you read that back to yourself, does it make any sense to you, what coding?

when you don't get the answer you are looking for, you then try to qualify it by saying
Quote

but I was also wondering about how to wire the 1/8'' jack. It is a female jack, with three pins from radio shack. Any ideas on how to wire it?


Going on your last part of the question, I would say, with a soldering iron and wire.
I guess what I am suggesting is that you need to be clear about your question.

liudr


I know that, but I was also wondering about how to wire the 1/8'' jack. It is a female jack, with three pins from radio shack. Any ideas on how to wire it?


You can solder a female jacket on a perf board. I have a few like that on radioshack boards.

http://www.radioshack.com/product/index.jsp?productId=2102845&znt_campaign=Category_CMS&znt_source=CAT&znt_medium=RSCOM&znt_content=CT2032230

I_Got_Pi

Thanks guys! With all the information you gave me, I was able to complete my "air piano!" You helped a lot.

Go Up