Here is the tricky part of the pedalo boat.

How to accumulate the turn degrees when we complete a sequence of movements

Let's start with an example. If a clock is showing 12 o'clock and we rotate the arrows to 90° it will show 3, but if we then rotate them to another 90°, the clock will show 6 o'clock.

6 o'clock is exactly 90°+90°=180° from 12 o'clock.

The Gyro sensor works in the same way. If we want to robot to turn to 30°, but we have previously turn to 90°, we must instruct the robot to turn until the sensor measures 30°+90°=120°.

Second turn with the pedalo boat in the dam

The next task for the robot is to make a second turn, this time to 60°. Up until now the robot has turned to 90°. Look at the scheme below. We should calculate the value that we should set for the gyro sensor. The Wait block for the Gyro sensor must wait for the robot to turn and when the robot turns to this number of degrees, it should stop. When we use the Gyro sensor we must add all the angles that we have turned to up until now. 

What is this value?

content picture

For the curious

The dotted lines on the picture above show the path of the boat without changing its direction. When we add the degrees that we have turned up until now we use these dotted lines. The angle is between the dotted line (previous direction) and the new direction of the robot.

Moving the robot in a triangle

When moving an a triangle we can apply the knowledge about the dotted lines and the angle between the dotted line and the new direction of the robot. 

The robot turns three time on the outside angles of the triangle. The outside angles are 120° while the inside angles are 60°.

Note that a straight line could be represented like an angle of 180° . This helps us understand that the outside angle is always equal to 180° minus the inside angle.