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 touch sensor

The Touch Sensor (shown in Figure 5-2) has a small button on the front. NXT-G blocks can use input from this sensor to tell whether the button is pressed, released, or bumped (bumped means the button was pressed and then quickly released).

Programmers often use the Touch Sensor to detect when the robot has run into something, but you can also use it to control your program. For example, you can have the robot wait until you press the Touch Sensor before it starts moving.

The Touch Sensor

Figure 5-2. The Touch Sensor

configuration panel

You can configure the Touch Sensor as part of the Wait, Loop, or Switch block. The part of the 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