Hey! I have some problems with my source code! Ok first of all to describe my robot: is based on arduino uno and 3 IR sharp rangefinder, 2 static (left-right) and one is placed on a servo. What i need for this robot is to follow any moving objects (like my hand for example), "and if it can to focus on that object and ignore the background" - this is not an must.
The problem is that my robot wont go straight, only right or left and i cant figure it out how to make both motors to move in same time when my hand will get far away from the central sensor. And 1 more problem, I would like him to keep an certain distance from the object not to collide with it.
You have my source code attached.
Please if anyone can help, Ty for your time!