Learning CS and Math with Robotics
Barobo

CSP Unit 3 Lesson 7.2

Piano MinView
Linkbot Image Mindstorm Image
x-12-606121824y24181260-6-12
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
Simple View: Grid Size: S M L
CSP Unit 3 Lesson 7.2

In this activity we give a name to something you have already been doing. You may have noticed that some commands we have been using require an input value. In the case of driveDistance, for example, we must supply the distance to be moved in terms of the number of units on the grid. In progamming terminology, we say that driveDistance "accepts a parameter," and that the input value is supplied, or given, to the parameter. The parameter value goes within parentheses after the command's name. In contrast, the traceOn and traceOff commands do not have a parameter--no input value is required, and the parentheses for them are empty. Using only the turnRight and driveDistance commands, see if you can adjust their parameter values to travel in a straight line from the robot's starting point to the far upper right corner of the grid (the point x = 24, y = 24) without going off the grid. How far is it? Compare your best answer with your neighbor's.

Load Blocks
Hardware
LArduino
Workspace Show Ch Save File Console

		
Rubbish bin
Time