I am building a robot which follows a black line on a white surface to solve user defined and re configurable maze. I have decided to go with
Micro-controller: Arduino Uno
Algorithm: Left-priority Wall Follower
Motors: 2 servo motor
Sensors: IR sensors
I am having difficulty with writing a code for 90 degree turn. I can't get a clear idea on how to write it. Can anyone help me?
P.S.: As i am using Arduino Uno, my coding language would be Arduino C. I am not professional with it but i can survive it as its my first time with an Arduino product. Thank you in advance.
It depends on the distance of both driven wheels.
Consider it as the radius. If one wheel makes (Pi x distance) more movement than the other it should give a 90 degree turn.
(If I calculated right)
The easiest way is to stop one wheel and only move the other wheel.
Or if the wheels are on the geometric center, turn them in opposite directions and it should rotate on center. This won't work if the drive wheels are fore or aft of center.
It depends on the distance of both driven wheels.
Consider it as the radius. If one wheel makes (Pi x distance) more movement than the other it should give a 90 degree turn.
(If I calculated right)
The easiest way is to stop one wheel and only move the other wheel.