Hey I found out that my sensor program is printing all the analog values in the serial monitor that it is detecting...i.e. when detecting an obstacle.
But now i want to limit my sensor range of detecting obstacles...and say that...
if the distance is >=300 cm, then it should print 300 irrespective of the distance above this range..
Can u help me how to do that..
Should i define the analog value got from the echo output of the ultrasonic hc sr04 sensor as constant..in a range >=300..
This is my logic..How else can u do the above?Please suggest..
HC-sr04 sensor image is been attached here
to which pins did u connect the echo and trigger pins.@cjdelphi...i hv dis program of mine....logic>>
motor vibrates more when obstacle near..and vice versa..
program is as follows