Chapter 7. Advanced Programming

In this chapter, we will explore some more advanced algorithms with a focus on what we need for navigation. This will be particularly useful for programming your robot to navigate an obstacle course or play a complex game, such as FIRST Lego League. In this chapter, we will cover how to:

  • Use Loops and Switches to drive in a square
  • Use Loops and Switches to avoid an obstacle
  • Navigate using Motor Rotation sensor feedback
  • Navigate using Gyro Sensor feedback
  • Simplify our program using My Blocks
  • Simplify our program using Arrays

Using any of our four base robots, we will make the robot go forward, make a 90 degree turn, go forward, and repeat this sequence several times. In this chapter, I have included programs using both ...

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.