What is a gyro sensor and how did it work with their CoDrone? What did they use it to do?
How else do they think they could use the gyro sensor with their CoDrone’s flight?
Activity: Gyro challenge
The challenge: have the CoDrone take off and travel in the same direction, no matter where it starts from.
- The CoDrone will take off, turn towards the proper direction, and then fly forward.
- You can divide your program into 4 sections, have one of your sections be a direction where your CoDrone does not turn, and have the other sections be directions where your CoDrone does turn.
Hint: the code you just made already divides the angles into 4 sections.
Activity: Compass challenge
Your challenge is to have the CoDrone take off and turn towards the four main directions --- 0, 90, 180, and 270!
- Your CoDrone needs to take off and turn towards the next direction.
- Once your CoDrone is facing the right direction, have it wait 3 seconds.
- Repeat until your CoDrone has faced all directions.
Hint: one direction was just done for you!
In this mission, you are going to program your CoDrone to fly in a square using its gyro sensor. The CoDrone will take off, turn towards 0 degrees, fly forward and then stop. It will do this for 90, 180, and 270 degrees until it's back where it started.