If middle sensor have more distance than other two then it moves forward. If left sensor have more distance than other two then it moves left. If right sensor have more distance than other two then it moves right. If all the sensors have less than max range then it checks which is greater in them.If distance between left & middle sensor is less than max range and distance between right sensor and object is more then it moves right. ![]() If distance between right & middle sensor is less than max range and distance between left sensor and object is more then it moves left.If distance between the middle sensor and the object is greater than max range then it moves forward irrespective of distance between the other two ultrasonic sensors and objects.I will provide arduino code as well, don't worry. Follow this algorithm clearly, while writing your arduino code. ![]() This is the algorithm when you use three ultrasonic sensors.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |