|
|
| Why do my motors stop running even though I have them running in loops? |
| (1 ) |
100%
0%
|
If the Move button is in the loop, very often the problem is how long the motor is set to run. The best way to make the motor run continuously is to set it to run for infinity, and then have another condition to stop the motor when desired.

In this program, the timer function is used, and when a certain time is reached, the motors switch directions. Inside the 'switch' block, you can see that there are two motor functions. Had the motors been set to a period of time (say 1 second), then the motors would have run for one second, stop, and then run for another second after redoing the loop. In order to fix this, the time set for the motors was infinity. That way, when the time was reached, the motor just switched directions for infinity. You could replace the block with a motor block that simply stops the motor, rather than making it run in the opposite direction.
|