Under standing Ultra Sonic Sensor.

Plz some one tell me what is the meaning of this line .

return int((duration / 2) / 29.1);

I understand the lot of things. And these thing are become more interesting. I need on few blogs that the Range of Ultra Sonic Sensor 2cm - 400cm. How can we change the distance of measurement. I want only two feet to measure. What should you friends suggest me.

That line returns the distance between the sensor and the object in cm.

“duration” is the time it took for sound to travel from the sensor to the object and back, in microseconds.

Sound takes about 29 microseconds to travel 1 cm in air at room temperature.

Dear If i only want to stick on 12cm then the command will change or remain the same.