Library | Building | Programming | Quick Guides Home | Quick Guides to Building | Quick Guides to Programming | LVLM | WeDo

Order by : Name | Date | Hits [ Ascendant ]

This program runs a motor using a "while loop" until a touch sensor is pressed.

Table Car 06/02/2011 Hits: 224

This "Table Car" will drive forward until its light sensor senses it is at the edge of the table.  Then, it will back up and turn randomly.  This process is repeated until the user aborts the program.

This example shows another way of keeping the wheels at the same speed, even with differences in motors and environment.  By keeping track of the differences between rotation of each motor, and using that difference to adjust the motor power, this program ensures that the wheels rotate the same amount.

Straight Line Steering 06/02/2011 Hits: 208

This example shows one way of compensating for differences in steering for a robot moving in a straight line.  By taking the difference in rotation between the two motors and multiplying by a gain, the program accounts for variations in motor distance.

Simple Movement 06/02/2011 Hits: 194

This example demonstrates some simple movements and motor functions.  The program goes forward until the touch sensor is pressed, brakes, then waits again for the touch sensor in order to go backwards.

Run for TIme 06/02/2011 Hits: 181

This example demonstrates controlling how long a motor will run.

Run for Distance 06/02/2011 Hits: 179

This program allows the user to input a desired distance for an NXT vehicle to move forward.

Rotation Position Control 06/06/2011 Hits: 221

This example demonstrates how to control the rotation of a motor very accurately.  On the front panel, the user inputs the desired position (in degrees) of the motor. The user can also adjust the control gains, Kp and Ki which affects the input power of the motor. Kp is a proportional gain, it scales the difference between the motor's current position and the desired position--this difference is known as the error. Ki is an integral gain, it scales the total accumulated error during the program. Play around with the gains to see what works the best.

Position Control 06/06/2011 Hits: 211

This example shows how to keep an object a set distance away from the robot.

Front Panel Steering Control 06/06/2011 Hits: 192

This example shows how to control the steering icon using the front panel.