Working with Version 2

Version 2 of the Wander service corrects a few problems you may have encountered while running version 1 of the service. Before making changes to the code you have created so far, you should make a copy of the existing Wander service and name the source folder Version1. You can then name the folder containing the copied version Version2.

In version 2, we will integrate the ultrasonic/sonar sensor available on the LEGO NXT. This will allow the NXT to turn away from an obstacle before a collision occurs. We will also use the sound sensor to detect a loud noise and, thus, command the robot to stop. Finally, we will add a watchdog timer to help prevent the robot from "spinning its wheels" unnecessarily.

Tip

When you create a new ...

Get Programming Microsoft® Robotics Studio now with O’Reilly online learning.

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