Loop and the Gyro Sensor
Now we will repeat this exercise using the Gyro Sensor that comes with the Educational Version of the EV3 kit. If you have the Home version, you might consider buying the LEGO Gyro Sensor or the Gyro or Compass sensor from HiTechnic or other third-party vendors. You can buy the LEGO EV3 Gyro Sensor directly from LEGO, part number 45505, for about $30. In the following screenshot, you can see that the loop is the same except we will use a move to turn while steering until the Wait block is triggered by a change in state of the Gyro Sensor by 90 degrees:
Before you run the program, you need to make sure the robot is absolutely ...
Get Learning LEGO MINDSTORMS EV3 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.