Library | Building | Programming | Quick Guides Home | Quick Guides to Building | Quick Guides to Programming | LVLM | WeDo
Wait for Stall
Details for Wait for Stall
PropertyValue
NameWait for Stall
Description

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.

FilenameWait for stall.rbt
Filesize425.44 kB
Filetyperbt (Mime Type: application/octet-stream)
Creatorjadler
Created On: 07/16/2007 00:00
ViewersEverybody
Maintained byEditor
Hits20296 Hits
Last updated on 07/23/2007 14:34
Homepage
CRC Checksum
MD5 Checksum
Home | About Us | Contact Us
© 2013 Center for Engineering Educational Outreach, Tufts University
© 2013 The LEGO Group. All rights reserved.