- :-
Mini-challenge solutions

Program Review: Right Turns!

  • The program shown below is a sample solution to the Right Turns! Mini-Challenge from Turn For Angle 4.
  • Keep in mind that the Gyro Sensor's value increases when making a left turn, and decreases when making a right turn.
Hover on any block in the program to view a detailed explanation.
1_ResetGyro_have you reset everytime? Reset the Gyro Sensor's value to 0. Set the Gyro Sensor to register the current position of the robot as "0 degrees".
2_SetMotor_sets just one motor Turns motor 1 On at 35% power. Starts turning the robot to the right by driving the left side of the robot forward.
3_SetMotor_ Turns motor 1 On at -35% power. Starts turning the robot to the right by driving the right side of the robot backward.
4_WaitUntil_ Stops the program from processing additional commands until the Gyro Sensor's Degrees value is less than -85. Robot waits until it have turn to the right 85 degrees.
5_StopMultipleMotors_blah Stops motors 1 and 6. Stops the robot (after the WaitUntil block finishes).

Program Review: Gyro Lap

  • The program shown below is a sample solution to the Gyro Lap Mini-Challenge from Turn For Angle 4.
  • The solution below is for making a Clockwise path on the follow setting:
Hover on any block in the program to view a detailed explanation.
1_ResetGyro_ Reset the Gyro Sensor's value to 0. Set the Gyro Sensor to register the current position of the robot as "0 degrees".
2_SetTouchLEDColor_ORANGE Set the value of the TouchLED as 'colorOrange' Lights TouchLED in Orange to indicate that the robot is moving forward.
3_Forward_ Moves the robot forward 3 rotations at 50% power. The robot drives along the long side of the box.
4_SetMotor_ Turns motor 1 On at -35% power. Starts turning the robot to the left by driving the left side of the robot backward.
5_SetMotor_ Turns motor 1 On at 35% power. Starts turning the robot to the left by driving the right side of the robot forward.
6_SetTouchLEDColor_ Set the value of the TouchLED as 'colorBlue' Lights TouchLED in Blue to indicate that the robot is making a turn.
7_WaitUntil_ Stops the program from processing additional commands until the Gyro Sensor's Degrees value is less than -88. Robot waits until it have turn to the right 88 degrees.
8-13_RepeatedPattern_ Copy of the behavior pattern used earlier in the program. LED lights up in Orange to indicate that the robot is moving forward for 7.5 rotations, the short side of the box. After moving forward, LED lights up in Blue, and the robot turns until the Gyro Sensor's value is less than -178. (Additional approx. 90 degrees to the right).
14-19_RepeatedPattern_ Copy of the behavior pattern used earlier in the program. LED lights up in Orange to indicate that the robot is moving forward for 16.5 rotations, the long side of the box. After moving forward, LED lights up in Blue, and the robot turns until the Gyro Sensor's value is less than -268. (Additional approx. 90 degrees to the right).
20_StopMultipleMotors_blah Stops motors 1 and 6. Stops the robot (after the WaitUntil block finishes).