DocumentsDate added

This code turns on Motor A for two seconds, and then turns it off.
Similiar codes can be made by adding motors or changing times.
This program says "Hello."
View Program
Like its smaller cousin, the three-button remote control is a
great way to define unique behaviors for your robot. The advantage
to the three-button control is that there are now 8 possible behavior
combinations, compared to just 4 on the 2-button remote. In addition
to forward, left and right motion on our two motor car, it is now
possible to move in reverse, and even control a third motor. With
so many combinations, it is possible that you don?t need them
all. In that case just leave one branch of the Switch empty.
View Program
This program uses two touch sensors combined with two Switches--all in an infinite loop--to display a number on the screen. Port 1 adds 1 and Port 2 adds 100. The "adder" variable is set to zero at the beginning of this program.
This program beeps, runs Lurch-1, then beeps again.
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.
This is another version of the two-button remote.
The two-button remote control is a very versatile program for controlling
Lego robots. It uses a series of touch sensor Switches to determine which
behavior you want to trigger. Since the Switches are between a set of Loops, the program loops infinitely, and the behavior of the robot
will change every time a different touch sensor is hit.
In this program, the two-button remote is setup to control a car
with motors connected to Ports A and C. When only touch sensor 1 is pressed, Motor A spins forward and Motor C spins backward. This will turn
the car left or right. When only touch sensor 2 is pressed, the
motors are reversed and the car will spin the opposite direction.
If both touch sensors are held, the motors go forward. When no touch
sensors are held, the car does not move. Remember, each branch of
the Switch can control something different. It does not only work
for a car. The touch sensors can trigger music, events, even mail
to other robots. The possibilities are endless.
View Program
The advanced proportional control program works the same way as
the basic version; however, this code allows the user to vary the
proportionality constant. When run, the NXT first displays the current
proportionality constant that the later "power" variable will be divided
by. Thus, if 4 is shown on the NXT, the proportionality constant will
be ? or .25. The constant can be changed by turning the rotation
sensor. Only positive values will work. After the constant is set,
a press of the touch sensor will "Switch" into the proportional control loop from the basic program.
Experiment with different constants. Note the difference between very
small constants and very large constants.
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.