Learning CS and Math with Robotics

CSP Unit 3 Lesson 8.4

Piano MinView
Linkbot Image Mindstorm Image
Grid Lines:
Tics Lines:
Width px
Hash Lines:
Width px
Font px
Trace Lines:
Robot 1:
Width px
Robot 2:
Width px
Robot 3:
Width px
Robot 4:
Width px
Simple View: Grid Size: S M L
CSP Unit 3 Lesson 8.4

Add code to the traceTriangle function definition that (1) turns on the trace, (2) uses the driveDistance command to move the robot by a sideLength amount, (3) turns the robot left by 120 degrees, (4) uses driveDistance again to trace the next side, and so on for the rest of the triangle. The last command in the function definition should turn off the trace. Then add code to the Workspace that will use driveDistance and turn commands to move the robot to the point (8, 15) and then call the traceTriangle function to draw a red triangle of side length 12 (as shown in blue).

Load Blocks
Workspace Show Ch Save File Console

Rubbish bin