Learning Math and CS with Robotics
Sign In

CSP Unit 3 Lesson 6.2

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

Now's your chance to put into practice some of the things you have been learning about coding and functions. Create a program that directs the robot to trace out the blue figure shown. Think about what parts are repetitive and how each might be coded as a function. After the initial setSpeed and traceColor commands (pre-placed), your program should call a function that then calls other functions, as appropriate, to draw the figure. Use descriptive names for the functions. (To turn left or right, or turn around, you may use the built-in "turn" function with the appropriate direction and angle.)

Load Blocks
Hardware
LArduino
Workspace Save File Show Ch Edit Ch Console

		
Rubbish bin
Time