Is there a way to code the bot so when it hits the wall, it doesnt stop trying to finish the code? I’m asking more for my robotics kids on this one, they are using a drive command to hit the wall, but they are playing around with the exact numbers, but its a give or take.
Is there a way to put like a variable in the numbers so it knows it hit the wall? Without putting a bump switch on it? We’ve tried bump switches before and its always been an issue trying to stay within size.
You are gonna need some kind of way for the robot to know if it is hitting the wall or is not moving. With odometry, this is easy to implement. Just get the current location, and if the robot’s current location is the same after a period of time, stop the motors. You could use a distance sensor, but I have no experience with that sensor.