- :-
Mini-challenge solutions

Program Review: Color Sensor Comparison

Hover on any block in the program to view a detailed explanation.
1_IfElse_Block Checks whether the Color Sensor value is 'colorGreen'. If it is, sends program flow to the 'if'(first) branch. If not, sends program flow to the 'else'(second) branch. Robot makes a decision based on whether the Color Sensor sees Green or not.
2_TurnRight_ Turns in place to the right, for 0.5 rotations (approx. 90 degrees) at 50% power. Turns 90 degrees to the right if green is detected.
3_TurnLeft_ Turns in place to the left, for 0.5 rotations (approx. 90 degrees) at 50% power. Turns 90 degrees to the left if green is NOT detected.

Program Review: Tiled Maze

Hover on any block in the program to view a detailed explanation.
1_Repeat_Block When flow reaches end of loop, sends the program flow back to the start. This action will repeat 10 times, then on the 10th time the repeat loop allows the flow to pass. Robot repeats the movements inside the loop 10 times.
2_IfElse2_Block Checks whether the Distance Sensor value is less than '30'. If it is, sends program flow to the 'if'(first) branch. If not, sends program flow to the 'else'(second) branch. Robot makes a decision based on whether there is a maze wall within 30cm.
3_TurnRight_ Turns in place to the right, for 0.5 rotations (approx. 90 degrees) at 50% power. Turns 90 degrees to the right to avoid hitting the maze wall.
5_Forward_ Moves the robot forward 1.5 rotations (approx. 30cm) at 50% power. The robot drives 30cm forward. This would be a single 'maze tile'.