O'Reilly logo

Lego Mindstorms NXT-G Programming Guide, Second Edition by James Floyd Kelly

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

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 ...

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