Set the Robot's Speed Just like a car, a robot can move fast or slow. You can control the speed that the robot is moving with the setSpeed block. It has one input value, which is the rate the robot is moving, in inches/second:
You can use a setSpeed block at the beginning of the code to set the speed for all later robot movements. You can also add a setSpeed block before any driveDistance block to specify how fast the robot should drive for that distance:
You can test the time it takes for the robot to go different distances at different speeds by using the timer to see how long it takes for a program to run. (The timer is in the middle section, just below the trash can icon.)
Click the Video at top right to learn more and see a demonstration.
|
The code drives the robot forward 12 inches at 3 inches per second. |
Grid Size: S M L | Simple View: | MinView: |
![]() |
|
Coord: x-axis y-axis | Grid Lines: x-axis y-axis | |||
Grid: | 12x12 inches | 24x24 inches | 36x36 inches | |
72x72 inches | 96x96 inches | 192x192 inches | ||
1x1 inches | 2x2 inches | Fraction: | ||
xy-Range: | ||||
|
||||
|
||||
Quad: | 1 Quadrant | 4 Quadrants | 1&4 Quadrants | |
Units: | US Customary | Metric | Ruler: |
Labels: |
|
|
|
Font
px
|
|
Tics Lines: |
|
Width
px
|
Hash Lines: |
|
Width
px
|
|
|||||||||||
|
|||||||||||