- :-
Mini-challenge solutions

Program Review: Vacuum

Hover on any block in the program to view a detailed explanation.
1_SetMultipleMotors_Block Turns motors B and C on at 50% power. Starts moving the robot forward. StopMultipleMotors block will need to stop the robot later.
2_WaitUntil_first wait block Stops the program from processing additional commands until the Touch Sensor value is '1' (Pressed) Robot waits until the Touch Sensor is pressed before continuing the program.
3_Forward_Blah Moves the robot 0.5 rotations at 50% power. Robot backs up from the wall. Note that the program can only reach this block after the "WaitUntil" block finishes.
4_TurnRight_Blah Turns in place to the right, for 0.5 rotations (approx. 90 degrees) at 50% power. Turns 90 degrees to the right.
5-8_RepeatedPattern_first pattern Copy of the behavior pattern used earlier in the program. Robot moves forward until it touches the wall, then backs up a little, and turns 90 degrees to the right.
9-12_RepeatedPattern_ Copy of the behavior pattern used earlier in the program. Robot moves forward until it touches the wall, then backs up a little, and turns 90 degrees to the right.
13_SetMultipleMotors_Blah Turns motors B and C on at 50% power. Starts moving the robot forward.
14_WaitUntil_Blah Stops the program from processing additional commands until the Touch Sensor value is '1' (Pressed) Robot waits until the Touch Sensor is pressed before continuing the program. The robot will be hitting the last (4th) wall.
15_StopMultipleMotors_Blah Stops motors B and C. Stops the robot (after the WaitUntil block finishes).