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

Chapter 5. sensors

In this chapter, you’ll learn how to use the NXT sensors to get your robot to react to what is happening around it. In the example programs in the previous chapter, the robot didn’t react to anything around it; it simply followed the path you programmed. By using the NXT sensors in your program, you can make your robot avoid obstacles, follow a line on the floor, react to light or sound, and identify objects based on their color.

We learn about the world around us using our five senses (touch, sight, sound, smell, and taste). A robot uses sensors in the same way to gather information about its environment. The LEGO MINDSTORMS NXT kits come with several sensors, each of which is useful for solving certain problems, depending on ...

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