Can you please tell how can I turn the servo by checking the distance from SONAR..I dont need PID..I have to set angle at myservo.write();
Actually it is an autonomous RC car with SONAR sensor to always drive at middle of the track
Posts by nafis
-
-
Read the thread quoted by Skyefire and you will see clearer. There is a good explanation of what you need in that thread in the arduino forum.
Can you please tell how can I turn the servo by checking the distance from SONAR..I dont need PID..I have to set angle at myservo.write();
Actually it is an autonomous RC car with SONAR sensor to always drive at middle of the track -
I have to make a bot which has front wheel steering by one servo motor like real cars..and one driving motor to run the robot..by rotating the servo the bot will turn right and left..there is Two SONAR on the left and right side to detect the distance from left and right wall. By taking the distance from both sides of the wall the robot has to be moved continuously forward at the middle position by steering the front wheel with help of the Servo.
How can I rotate the servo with PID for smooth turning? At 118degree the servo is straight and the robot is entirely forward. that means at 118degree of servo the robot will be completely straight.
How can I code the PID algorithm to rotate the servo by taking the distance from two sonar sensors?