I have been trying to get this arduino turtle to detect walls in front of it then scan for the furthest wall and carry on to move towards it. I have 3 sensors, one in the front and two at about a 45 degree angle on the sides.
The problem is, once it detects the wall it'll step away from the wall but then once it turns around it'll move forwards an inch then stop moving and begins to scan even though there is no wall in front.
Here's the code:
https://shrib.com/JifP76ph6pH17kj
The problem is, once it detects the wall it'll step away from the wall but then once it turns around it'll move forwards an inch then stop moving and begins to scan even though there is no wall in front.
Here's the code:
https://shrib.com/JifP76ph6pH17kj