yes that's what it does. but here's what i want
Read from a distance:
wait 1 second:
If the distance <= 10:
turn forward:
Rotate for a second:
Stop:
Read from a distance............
If the distance is still <=10
hold till distance is greater than 10
then
Read from a distance, if distance is greater than 10
move backwards
stop
hold till distance greater than 10
then move forward and so on