In order to measure the speed of sound (or anything) You need to know how far it went and how long it took to do it. If the PING sensor will return data in the form of time (msecs or such)--and I don't know that it will (check the data sheet--you need to know how to configure it anyway)-- you would then "PING" a known distance, say 1 meter. If the sound takes 8 msecs to travel the 2 meters (out and back), then the spreed of sound is figured by dividing distance by time--factored to scale. In our poor example: 2 meters in 8 msecs = 4 msecs/ meter. There are 250 (4 msecs) in a second so... our calculations reveal that sound travels 250 meters per second.
Of course, you realize that the 'ping' measurement is the time for the pulse to travel the meter, reach the far end, 'bounce', and come back again. Thus, if your 'fixed' target is at 1 meter, the time will be for 2 meters of distance -- there and back again.
Comments
0.54milliseconds / 1meter
to work out the speed of sound.
Thank you
Thank you
Thank you
Post Edited (computer guy) : 4/4/2007 7:54:28 AM GMT