Previously, when you wanted to turn 90 degrees you needed to guess how many seconds you needed to turn. Now that you have access to the gyroscope data, you don’t have to guess. This time, you will use a while loop to keep turning until the angle becomes greater than 90 or less than -90, depending on the direction you want to go. First, you will write a code that will turn CoDrone Mini to the left 90 degrees.
After you takeoff, it would be a good idea to print the current reading to make sure that you are starting at 0 degrees. Then, set your yaw value and move() in a loop while the yaw angle is less than 90 degrees. Once the angle reading goes above 90 degrees, the while loop will break and CoDrone Mini should land.