Hi,
I am doing a GPS toy car following the project online:
when a HC-SR04 detected a obstacle, the Arduino controlled the car turn a angle to avoidance.
my question is how to decide the turning angle is good? are there any angle sensor to do feedback or use Encoder?
right now it is used the delay time to control the car turning which some time too less, some time too much.
Thanks for help.
Adam
@lladam Welcome to the RobotShop Community. Normally encoders work provided the robot’s wheels don’t lose traction. Magnetic compasses however are ideal and give you an angle based on the earth’s magnetic field (like a real compass) which gives an absolute measurement (rather than just something relative to your last position): https://www.robotshop.com/en/catalogsearch/result/?q=compass&order=relevance&dir=desc