Frequency Measure

jiwonie:
I want to convert pulse width produced between 50 and 100cm to one slow frequency. Then, from 50cm, I want to convert pulse width produced every 10cm to different frequencies. So when the object comes closer to the sensor, I would like to produce faster sound to alert.

Ah... some info on your ultrasonic range finder would be handy

Meanwhile, assuming you can just tell the rangefinder to GO and then want to read a pulse, have a look at pulseIn()

You can then test the result value and use tone() to generate the sound.

Yours,
TonyWilk