Learning Math and CS with Robotics
Sign In

CSP Unit 3 Lesson 8.3a

Piano
Linkbot Image Mindstorm Image
Grid Size: S M L Simple View: MinView:
CSP Unit 3 Lesson 8.3a

The pre-placed code moves the robot to the point x = 10, y = 10 (with the trace off) and then calls the "traceSquare" function (defined at the bottom of the code), sending it a parameter value of 14. When the traceSquare function receives the value of 14, it inserts it into its "sideLength" parameter and then executes the function's code to trace the square. There's one bug in the code, however. Run the pre-placed code to see what happens, and then find and fix the bug. (See the hint if you get stuck.)

Load Blocks
Hardware
LArduino
Workspace Save Show C Edit C Ch Shell Console

		
Rubbish bin
Time