conclusion

Using multiple Sequence Beams allows your program to perform more than one task simultaneously, a form of multitasking. The changes made in this chapter to the AroundTheBlock and DoorChime programs demonstrate two simple ways to enhance a program by adding a second Sequence Beam.

Although multitasking is a very useful programming technique, it comes at the cost of added complexity. The simple program flow rules that you’re familiar with become more complicated when using more than one Sequence Beam. For this reason, multitasking works best with small, independent tasks.

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.