Programming the climbing sequence

If the IR sensor does not see the obstacle, then the obstacle is low enough that the Omnilander can attempt to climb it. The climbing sequence will be programmed into the false case of the IR sensor switch.

The climbing sequence will be similar to the one we made for the RC program. The first block is a move tank block set to On for Seconds, and it will power both drive motors forward at -35 percent power for 1.8 seconds. This block allows the robot to close the 20-centimeter gap between it and the obstacle it just detected.

Now, the robot is in position to climb the obstacle. The remainder of the climbing sequence is identical to the one we made for the RC program. A medium motor block rotates the motor ...

Get Building Smart LEGO MINDSTORMS EV3 Robots now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.