Library | Building | Programming | Quick Guides Home | Quick Guides to Building | Quick Guides to Programming | LVLM | WeDo
LEGO MINDSTORMS NXT Software

DocumentsDate added

Order by : Name | Date | Hits [ Ascendant ]
file icon Hello Worldhot!Tooltip 05/30/2006 Hits: 3116

 

This program says "Hello." 

file icon Random Motionhot!Tooltip 05/30/2006 Hits: 5211

View Program

The code will run Motor A in a random direction (via a Random-Comparison Block combination), at a random speed, for a random amount of time. The motor speeds will fall between 0-100 and the time will fall between 0-3 seconds.

file icon Line Follower: Switchhot!Tooltip 05/30/2006 Hits: 5785

 

This program is works like the Line Follower: Wait for Dark program but it uses a Switch. The program runs a Switch--in a infinite Loop--that runs Motor A and makes sounds when reading light. The program stops Motor A then runs Motor C for 0.25 seconds when reading dark.

file icon Line Follower: Wait for Darkhot!Tooltip 05/30/2006 Hits: 5306


This program runs Motor A until the light reading is less than 50. Once the light reading is less than 50, Motor A stops and Motor C runs for 0.25 seconds. This processed is infinitely looped. 

file icon Touch Sensor Switchhot!Tooltip 05/30/2006 Hits: 6969

 

This code uses two very important coding commands, Switches and Loops. The touch sensor Switch causes Motor A to go forward if the touch sensor is released and backward if it is pressed. The Loop causes the Switch to loop infinitely.

file icon Wait for Pushhot!Tooltip 05/30/2006 Hits: 6411

 

This code illustrates the Wait-for-Push command. When a touch sensor on Port 1 is pressed, Motor A will stop.

file icon Drive to Black Linehot!Tooltip 05/30/2006 Hits: 4640

View Program
 

There are many ways to stop a car at a black line. Using a light sensor attached to Port 1, the program takes the initial light reading, drives forward (one motor car) and waits for a difference greater than or equal to 5. Once this difference is reached, the Switch stops the NXT and exits the program.

file icon Snakehot!Tooltip 05/30/2006 Hits: 6376

View Program

When run, this code will cause a car to "snake" forward in wide arcs. The length of the turns can be modified by changing either the time or motor power.

file icon Lurch - 2hot!Tooltip 05/30/2006 Hits: 4561

 

This program beeps, runs Lurch-1, then beeps again. 

file icon Lurch - 1hot!Tooltip 05/30/2006 Hits: 5578

 

This code uses a Loop to turn Motor A on-and-off three times. When downloaded to a single motor car, this program will accelerate the vehicle forward in three short bursts. The number of loops can be changed by modifying the Count of "3". Alternatively, if you want an infinite program, you can set the Control of the Loop to Forever.

«StartPrev123NextEnd»
Page 2 of 3
Home | About Us | Contact Us
© 2013 Center for Engineering Educational Outreach, Tufts University
© 2013 The LEGO Group. All rights reserved.