Skip to Main Content
The Art of LEGO MINDSTORMS NXT-G Programming
book

The Art of LEGO MINDSTORMS NXT-G Programming

by Terry Griffin
August 2010
Intermediate to advanced content levelIntermediate to advanced
288 pages
13h 21m
English
No Starch Press
Content preview from The Art of LEGO MINDSTORMS NXT-G Programming

the compare block

The next programmable timer uses the Compare block to compare two numbers. The Compare block is in the Data group of the Complete Palette (shown in Figure 10-18) and will appear in your program as shown in Figure 10-19. You can supply the two input values using data wires or the Configuration Panel (shown in Figure 10-20). The comparison is made based on the operation selected, which can be either Less than, Greater than, or Equals. The result of the comparison is written to an output data plug.

The Compare block on the Complete Palette

Figure 10-18. The Compare block on the Complete Palette

Figure 10-19. The Compare block

Figure 10-20. The Compare block’s Configuration Panel ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

The Art of LEGO MINDSTORMS EV3 Programming (Full Color)

The Art of LEGO MINDSTORMS EV3 Programming (Full Color)

Terry Griffin

Publisher Resources

ISBN: 9781593272180Errata