Getting out of a tight spot


I am new at this. I successfully programmed a simple version of “sumo” wrestling. it works fine.
However, there are situations where the two bots get tangled up with each other.
is there a way to create a sequence that: 1. detects that the bot is stuck i.e. is not moving, or hardly moving
2. responds by issuing a command (for example) to run backward at some speed (or make a turn, etc)
thank you


If it is the mBot STEM, then the answer is likely no because the motors on the stock mBot STEM do not have encoders that would allow you to detect that. You might try using the ultrasonic sensor to see if the value stays constant (close range, not the out of range value) and see if that works for you.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.