Object tracker robot with ultrasonic

Hello guys, I'm a newbie, but I would like to build a robot that follows objects and persons with Arduino. I know that the simplest way to do this should be with one servo and one ultrasonic sensor: How can I do it? There is a video that shows this project, but the author says that he lost the code.... https://www.youtube.com/watch?v=xF0Dl_SjOAE

If you can help me with this project, I will be glad to you. Thank you very much

I know that the simplest way to do this should be with one servo and one ultrasonic sensor:

I'm curious - how do you know that?

(IMO it would be simpler to buy a puppy)

AWOL: I'm curious - how do you know that?

(IMO it would be simpler to buy a puppy)

One guy did this, watch the video

houndog: One guy did this, watch the video

No thanks - I've been caught out by that stuff before.

One guy did this, watch the video

I did. The robot did NOT follow a person. It turned to face the nearest object.

It made NO attempt to maintain a constant distance from that object. It made no difference what that object was.

Extending the "face the nearest object at all times" capability to maintain a constant distance is MUCH harder. Extending the "face the nearest object at all times" capability to deal with a specific object is MUCH harder.

Following a specific object at a specific distance is harder still.

But, don't let that discourage you. You just might be the one that makes it actually work. Keep us posted.

PaulS: I did. The robot did NOT follow a person. It turned to face the nearest object.

It made NO attempt to maintain a constant distance from that object. It made no difference what that object was.

Extending the "face the nearest object at all times" capability to maintain a constant distance is MUCH harder. Extending the "face the nearest object at all times" capability to deal with a specific object is MUCH harder.

Following a specific object at a specific distance is harder still.

But, don't let that discourage you. You just might be the one that makes it actually work. Keep us posted.

So, if you did it, do you have the code for following only objects?

So, if you did it, do you have the code for following only objects?

I believe PaulS meant that he watched the video. Evidently, he wasn't impressed.

What the robot did in the video is not what I imagine for "following an object or a person".