This block works for EV3, SPIKE™ Prime, and Zappy!
This block drives the robot forward or backward until the Distance Sensor detects an object a specific distance away. Use this block to stop the robot's drive missions where you're not sure about the exact drive distance relative to an object, and cannot rely on a specific number in a Drive Distance block.
Code Example:
Note how the robot stops when the distance from the obstacle is 0.49m - less than 0.5 like the < symbol says.
Comments
Please sign in to leave a comment.