O'Reilly logo

The LEGO MINDSTORMS NXT 2.0 Discovery Book by Laurens Valk

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

5

waiting, repeating, and other programming techniques

The previous chapter taught you how to program your robot to perform a variety of actions, such as moving. In this chapter, you’ll learn several programming techniques that will allow you to do more with the blocks you used earlier, including how to pause a program with Wait blocks, how to repeat a set of actions with Loop blocks, how to run multiple blocks simultaneously, and even how to make your own so-called My Blocks.

the wait block

So far you’ve been using three different programming blocks to make the robot move, play sounds, or display something on its screen. Now you’ll meet a block that does nothing more than pause the program for a given amount of time. This block is the Wait block ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required