getAngle MyBlock

This is the fifth MyBlock used in the navigation program. With this MyBlock, you can plug in the current position (latitude/longitude) and the target position, and it will calculate the angle at which that the robot needs to drive to in order to reach the destination; in short, it tells the robot what direction to drive in. As we make this block, we will learn about variables and parameters. We will also incorporate some advanced math.

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.