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

DocumentsDate added

Order by : Name | Date | Hits [ Descendent ]
file icon Basic Steering ControlTooltip 10/26/2009 Hits: 469
This program makes the car turn until the touch sensor is pressed. To control the degree and direction of steering, input a number between 100 and -100.


file icon Case Structure MigrationTooltip 10/26/2009 Hits: 425

This example demonstrates how a case structure can be used to control the movement of a motor. The state of the case structure is determined by the feedback from a touch sensor. If the touch sensor is pressed the motor moves forward and if is not pressed the motor moves in reverse.  Note: The touch sensor is only read once in this program, to have it continually update place the code in a loop.



file icon Case Structure Motor ControlTooltip 10/26/2009 Hits: 436
This example demonstrates how a case structure can be used to control the movement of a motor. The state of the case structure is determined by the feedback from a touch sensor.


file icon Control a Motor with a SensorTooltip 10/26/2009 Hits: 431
This program runs all motors until the touch sensor is pressed, then all motors are stopped using brake.


file icon Control a Motor with TimeTooltip 10/26/2009 Hits: 430
This program runs both motors forward for five seconds then stops them by braking.


file icon Drive DistanceTooltip 11/03/2009 Hits: 516

In this program, motors A and B rotate 720 degrees (two revolutions), the NXT brick plays the note C for 1 second, and then motor A rotates 90 degrees.

 


file icon Front Panel Steering ControlTooltip 10/26/2009 Hits: 487
This program turns the car for a set amount of time. The turning time, steering, power, and ports are all controls rather than constants, which means that they can be adjusted on the front panel of the program.


file icon Motor A on for 1 SecondTooltip 10/26/2009 Hits: 466
This program turns the motor on for one second, then stops the motor.


file icon Multiple Inputs and OutputsTooltip 10/26/2009 Hits: 500
This program uses multiple motors and multiple touch sensors. When it begins motor A runs forward until touch sensor 1 is pressed, motor B then begins to run until touch sensor 2 is pressed.


file icon PI Position ControlTooltip 10/26/2009 Hits: 597
This example illustrates how to write a proportional, integral controller for the NXT. 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.


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