- :-
Mini-challenge solutions

Program Review: Threshold Values

Hover on any block in the program to view a detailed explanation.
1_SetMultipleMotors_Block Turns motors B and C On at 20% power. Starts moving the robot forward with Ultrasonic Sensor towards the wall. StopMultipleMotors block will need to stop the robot later.
2_WaitUntil_first wait block Stops the program from processing additional commands until the Ultrasonic Sensor value is less than 25 ('< 25') Robot waits until the wall is less than 25cm away.
3_SetLEDColor_first TOUCHLED block Sets the value of the EV3's LED as 'ledRed'. Turns EV3's LED red.
4_WaitUntil_first wait block Stops the program from processing additional commands until the Ultrasonic Sensor value is less than 10 ('< 10') Robot waits until the wall is less than 10cm away.
5_SetLEDColor_ Sets the value of the EV3's LED as 'ledOrange'. Turns EV3's LED Orange.
6_WaitUntil_first wait block Stops the program from processing additional commands until the Ultrasonic Sensor value is less than 50 ('< 50') Robot waits until the wall is less than 50cm away.
7_SetLEDColor_ Sets the value of the EV3's LED as 'ledGreen'. Turns EV3's LED Red.
8_StopMultipleMotors_ Stops motors B and C. Stops the robot (after the WaitUntil block finishes).

Program Review: Move Until Far

  • The program shown below is a sample solution to the Move Until Far Mini-Challenge from Forward Until Near 3.
  • It assumes that the robot starts facing a wall that is at most 30cm away from the robot's Ultrasonic Sensor.
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 backward, away from the wall. StopMultipleMotors block wil bel needed to stop the robot later.
2_WaitUntil_ Stops the program from processing additional commands until the Ultrasonic Sensor value is greater than 30 ('> 30') Robot waits until the wall is more than 30cm away before continuing the program.
3_StopMultipleMotors_Blah Stops motors B and C. Stops the robot (after the WaitUntil block finishes).