## Lesson Modules

## Teaching Tips:

- Ask students if they know what a gyroscope is. Show the video below first and then ask for observations, thoughts, and and questions. Next, have students read the article and ask how they think it relates to their CoDrone.

**Video:** Gyroscope Tricks and Physics Stunts

**Article:** What are Gyroscopes?

After watching the video and reading the article, answer the questions.

##

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?

## Teaching Tips:

• Ask students to use pseudocode to explain to a partner how they programmed their drone in Snap using both their own words and the appropriate academic language.

### Gyro sensor

Gyro sensors are a lot like compasses --- they sense rotational motion and detect orientation to figure out what direction something is facing. They're used in everything from space shuttles to cell phones, and now in your CoDrone!

The gyro sensor in your CoDrone reads from 0 to 359 degrees. At 360 degrees, when a full circle is completed, it starts back over at 0.

When the CoDrone is powered up, the direction it is facing at that point is saved at 0 degrees.

### Challenges

**Activity: Gyro challenge**

The challenge: have the CoDrone** **take off and travel in the same direction, no matter where it starts from.

Challenge Rules:

- The CoDrone
- 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!

Challenge rules:

- 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!

## Teaching Tips:

### Sample code

You can use the code for one side for all four sides, but you will need to change some of the values so it makes a full square! These are what your ranges should be:

- 0 degrees: 355-5
- 90 degrees: 85-95
- 180 degrees: 175-185
- 270 degrees: 265-275

Don't forget to include a flight event block at the end of your code so your CoDrone can land!

### Summary

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.

## Teaching Tips:

For more math extension:

- 4th grade: Have students work in pairs with one flying the drone and one marking its angles as it turns. The pairs should then measure the distance between sides of the rectangles to find their area and perimeter. They should also measure the angles to see if their drone really turned 90 degrees!
- 5th grade: Have students work in pairs with one flying the drone and one marking its angles as it turns as well as its height (this can be marked on the wall). The pairs should then measure the distance between sides of the rectangles as well as its height to find their volume. They should also measure the angles to see if their drone really turned 90 degrees!
- 6th grade: Have students work in pairs with one flying the drone and one marking its angles as it turns as well as its height (this can be marked on the wall). The pairs should then measure the distance between sides of the rectangles as well as its height to find their surface area. They should also measure the angles to see if their drone really turned 90 degrees!
- 7th grade: Have students work in pairs with one flying the drone and one marking its angles as it turns as well as its height (this can be marked on the wall). The pairs should then measure the distance between sides of the rectangles as well as its height to find their area, volume, and surface area. They should also measure the angles to see if their drone really turned 90 degrees!