Objective: In this introductory lesson, you will learn how to move the Linkbot robot a specified distance by using the driveDistance code block. Overview: This Hour of Code lesson introduces you to the Linkbot robot. You can control its movements on the grid on the left side of the window by dragging and dropping various "code blocks," or "commands," from the middle "Block" section to the "Workspace" on the right and then clicking the "Run" button (located just below the grid). These commands are simply instructions that tell the robot what to do. Once the commands are in place, clicking the Run button will cause the computer to run or "execute" the commands in sequence, one after the other, thus activating and controlling the robot. We will get the hang of it by starting with just a single command that has already been placed in the Workspace for you--the driveDistance command: To tell the robot how far to move, you enter a number into the blue box that is in the driveDistance command, then click Run. This number is called the "argument" for the command. To move the robot again, click "Reset" (which appears in place of the Run button after something is run), enter a different value for the argument, and then click Run again. (If you have a hardware Linkbot robot connected, the hardware robot will move in the same way as the virtual robot you see on the grid.)
|
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
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
|
Hello, I am a Linkbot robot. Please help me move forward 8 units (to the right, the direction I'm facing). |
|
|
|||||||||||
|
|||||||||||