I am building a ultrasonic based human following tri wheel robot.
i have used three ultrasonic sensor to detect presence of human at angles of 45, 90,135 degrees.
a l298d motor drives turns two dc motors.the front wheel is a caster wheel.
the project is done and working but not prefect.
can anyone help me in improving my project.
first of all the ultrasonic sensor does not continuously detect the presence. i tried changing them but same problem.
second, once detected after the motor moving it stop even when the person is in front of the sensor.
UKHeliBob:
The code would be easier to understand if you gave the distances more meaningful names.
i have used three ultrasonic sensor to detect presence of human at angles of 45, 90,135 degrees.
The three ultrasonic sensor will detect SOMETHING at 45, 90, or 135 degrees, but they can not tell you that the something is human or that it is moving or that it is, or is not, the thing you want to follow.
first of all the ultrasonic sensor does not continuously detect the presence.
Well
of
course
not.
Why are you burying your head in the sand all the time? GET RID OF ALL DELAYS!
if ((dist_left > 0) &&(dist_front==0)&&(dist_right==0)) {
turn_left();
}
Please explain, in English, what need to happen, in terms of where the human is, in order for the robot to turn left. Keep in mind that the sensors did NOT measure the distance to a human. Also, keep in mind what a distance of 0 really means.
You ARE aware of what a distance of 0 means, right? That is, of ALL the things that a distance of 0 means.