Robot Programming, Lab 1

GETTING STARTED

1. To start software, Start | All Programs, then select Lego Mindstorms NXT| Mindstorms NXT

2. Click on Start New Program or File | New  in the menu to begin a new program.

3. Grab a 'gear' Move icon and drop it into the work area. The
Move icon should be in the top-left box in the left palette. If it is not, chose the green circle at the bottom of the palette to open the common operations.

4. Select your Move icon and Click on A and C for the Ports. A and C are the engines for the left and right sides of the robot (B is for the claws). If one of those engines is on, the robot will turn. If they are both on equally, the robot moves forward. Change 'duration' to 3 seconds.

5. Grab a sound icon and drop it next to the gear icon. Choose what you want the robot to say.

6. Choose File | Save and save the file as forward1.rbt. Save it in a subfolder 'robots' below your H: directory (The H: is for your non-web files).

Downloading and running your first program

a. Connect one end of the USB cord to your robot's brick and the other to the workstation on the left of monitor.

b. On the computer screen, click on the down arrow button ("Download"). Your robot will beep once the program is loaded.

c. Unplug your robot and set it on the ground.

d. Use the orange menu button to find your program, and then press it to run.

The robots are very emotional and temperamental. If the download gives you an error, try unplugging and re-plugging in the USB cord. Be patient.

Lab Tasks

1. Write a program that causes the robot to move in a rectangle and then stop.
2. Write a program that causes the robot to go forward at 50% speed for two seconds, stop, and then go backwards at full speed for 1 second.


Recent site activity