CHAPTER 20PushBot—Program It

The PushBot has a LOT to do! Because of this, I want to be absolutely certain that my program works, and I'll be testing it often. To make it easier on myself, I'm going to break down the program into three sections. The first section will cover getting the bot to the proper location in front of the first figurine. The second section will cover the programming blocks used to put the first three figurines into their proper locations. And the final section will be devoted to pushing the last figurine up the ramp and onto the Mayan sarcophagus.

If you've built your own version of the PushBot, your program will most likely not match mine exactly. It really depends on how you've built your bot to complete the challenge. ...

Get LEGO MINDSTORMS NXT: The Mayan Adventure 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.