Invisible Stop
Copy and paste the following code into a new program and run it:
task main()
{
setMotorSpeed(leftMotor, 50);
setMotorSpeed(rightMotor, 50);
}
The Robot’s Central Processor is able to process tens of thousands of commands per second. This program will turn on both motors (2 commands), but since there are no other commands to process, the program reaches the end and activates the built-in safety command to shut down all of the motors. The result is that the robot will not move since it will have processed the movement commands so quickly that the robot does not have time to physically react. |
Did you know?
Point Turns vs. Swing Turns![]() |
The "turnLeft" and "turnRight" commands in ROBOTC only execute "point turns", where one wheel moves forward and the other wheel moves backwards. |
|
![]() |
A swing turn is a different type of turn that will allow your robot to turn by pivoting - one wheel moves forward, the other wheel remains stationary. Different types of turns allow your robot to navigate around obstacles easier. |
Mini Challenge 1: Turn of Time
Program the robot to make a 90 degree turn using a specific amount of time.
|