LEGO Engineering

| | | | | | | |
How can I gradually increase the speed of my motors (i.e., make my car accelerate slowly) in NXT-G?


20th of April, 2010

(8 )
87% thumbs up 12% thumbs down

The only way to adjust the power level during a program is to have it wired to some sort of varying function. The motor block, like many blocks in NXT-G, has a pull-down tab. One of the options is the power meter. This wire input accepts a value from 0-100, which is the same as the range of any of the sensors. As a result, it is quite easy to adjust the speed of the motors as a function of some other value.

The program below adjusts the motor speed depending on the value of the sonic sensor, which is useful if you do not want to run into a wall! You can use any number of other functions as well including the timer block, the light sensor block, or the sound block. These values can be combined, or you can use math blocks to add, subtract, multiply, or divide these values to suit your needs.



   :
   :
* :
* :
 


Home | About Us | Contact Us

© 2013 Center for Engineering Educational Outreach, Tufts University
© 2013 The LEGO Group. All rights reserved.