3

creating and modifying programs

Now that you’ve built your robot, the next thing the robot needs in order to function is a program. Programs tell your robot what to do. For example, a program can make the Explorer drive forward and then steer. This chapter will teach you how to create and edit programs.

a quick first program

You’ll first take a quick look at the NXT-G programming software by creating and downloading a small program to the robot. To create the program, follow these steps:

1. Connect the robot to the computer using the USB cable that came with the kit (Figure 3-1), and then turn on the NXT brick by pressing the orange Enter button. (You have to connect the robot to the computer each time you want to download a program to the ...

Get The LEGO MINDSTORMS NXT 2.0 Discovery Book now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.