understanding program flow rules

Using multiple Sequence Beams complicates the rules concerning program flow in several ways. For example, a program ends only once it reaches the end of all the Sequence Beams. In this section, I’ll discuss the other program flow rules that are affected by using multiple Sequence Beams.

starting blocks and data wires

A block can start running only after there are values on all the data wires attached to the block, as demonstrated by the BlockStartTest program in Figure 17-9. The Display block on the top Sequence Beam displays 1 and the Text block writes 2 to the data wire (to be used by the other Display block). The Display block on the bottom Sequence Beam can’t start running until after the Text block puts a value ...

Get The Art of LEGO MINDSTORMS NXT-G Programming 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.