Ok. I pulled the code and took a look. I'm pretty sure where your difficulties are coming from, but need answers to a few questions in order to give good answers.
-
what does ultrasonic.timing() return?
-
What does ultrasonic.convert(x,Ultrasonic::CM) do/return?
-
Please explain (brief please) what myservo1.writeMicroseconds(n) does.
-
What is the range of the ultrasonic device?
-
I'm not sure what the proper vocabulary is, but what is the aperture angle of the ultrasonic device?
This looks as if it could be a really fun project! ![]()