Chapter 17. Yes? No? Maybe?

In Chapter 15, I introduced you to the COMPARE block, which takes two numbers, A and B, and examines them to determine if A is greater than, less than, or equal to B (depending on the option you select). The result of this comparison is then converted to a Logic data type (either True or False) that can be used as output using a data wire. In Chapter 16, I showed you how the RANGE block examines a value and determines whether it falls between an upper and lower value—a True or False response is then generated.

In this chapter, I'm going to show you a block that is similar to the COMPARE and RANGE blocks, but not quite the same. Instead of comparing two numbers, this block will compare two Logic data type inputs and also ...

Get Lego Mindstorms NXT-G Programming Guide, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.