Output Sound with 1/8'' Audio Stereo Jack PLEASE HELP NEED GUIDANCE

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

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

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?

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

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.

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?

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

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