You can use the turn code blocks to turn the robot left or right by a specified number of degrees: The first version of the turn block above allows you to tell the robot to turn Left or Right by clicking the drop-down menu and choosing Left or Right, and then specifying how much the robot should turn by clicking the angle value to display a unit circle dial that shows the angle. Move the mouse pointer around the dial until you have the angle you want, then click to set it. Here are two examples, one for 90 degrees and one for 45 degrees:
The second version of the turn block above allows you to enter a specific value for the angle to turn left or right by changing the value in the blue block. The examples below show how it works. Click the Video at top right to learn more and see a demonstration.
|
The example drives the robot to the red dot, then the green dot using driveDistance and turn blocks. |
The example drives the robot to the red dot, then the green dot using driveDistance and turn blocks. |
Grid Lines: | ||
Tics Lines: |
|
Width
px
|
Hash Lines: |
|
Width
px
|
Labels: |
|
Font
px
|
Trace Lines: | ||
Robot 1: |
|
Width
px
|
Robot 2: |
|
Width
px
|
Robot 3: |
|
Width
px
|
Robot 4: |
|
Width
px
|
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: | |
Label: |
|
|
|
|
|
|
|
|
|
|
|
|||||||||||
|
|||||||||||