RoboMind website
RoboMind Example scripts
RoboMind Basic instructions: move, paint, grab, see
RoboMind Programming Structures: comment, loops, if-structures, procedures, end
Back to RoboMind Projects
Original version, see Robo Exercise Set 1
also see
ROBO Exercise Set 1
Arvid Halma from robomind.net
June 8, 2011
Open default.map
Use the remote control (Run > Remote Control) to move the beacon located south east of the robot to the south west corner.
Part 2 - write the script yourself. Type the commands yourself and run the
script.
The Remote control version will have more lines:
1 ... 2 forward(1) 3 forward(1) 4 forward(1) 5 ...and your version:
1 ... 2 forward(3) 3 ...
Part 2, Use a repeat loop to draw the three steps Let the robot take one step at a time
1 # Start to paint 2 repeat(3) 3 { 4 # Draw a single step 5 } 6 # Stop painting
Part 3: Use a procedure
Create a procedure drawStairs() that draws the three steps like the previous exercise.
procedure drawStairs() { # draw the three stairs here } drawStairs
Part 5: Make this procedure work for any number of stairs
procedure drawStairs(numberOfStairs) { repeat(numberOfStairs) { # draw each stair } }
Hint:
1 drawStairs(2) 2 3 procedure drawStairs(number) 4 { 5 # draw stairs with ‘number’ steps. 6 }This draws stairs with two steps.
Map 1:
Here are the steps:
Write one script that works with all the maps:
goRightAtWhite1.map, goRightAtWhite2.map, goRightatWhite3.map
Map 1:
Map 2:
Map 3:
Hint:
paintWhite repeat { repeatWhile(rightIsWhite) { if( ???) { forward(1) } else { end } } right forward(1) }
Part 2:
Second version
Use recursion to draw the arms of the spiral.
Hint: first make a procedure that lets the
robot move along one arm of the spiral.