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 | [ Descendent ]
file icon Wait for Stallhot!Tooltip 07/16/2007 Hits: 20301

This code runs motors B and C until they stall. The code takes two rotation sensor readings, with a very short delay in between them. The loop exits when the difference between the two readings becomes less than a certain threshold. So if a motor slows down because it encounters an obstacle, the code will stop running the motors. A short delay in the beginning is necessary so that the motor can start moving before the rotation sensors start taking readings. Note that if the speed of the motor is decreased, the threshold for the difference needs to be lowered as well. This program was adapted from Brian Davis' code.

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