Teacher Resources - Fly with Python

Digital Textbook

Fly with Python

A hands-on Python coding curriculum for grades 6-12+, taught through programming the CodeAIR drone.

📚 4 Units 🎯 Grades 6-12+ 🚁 CodeAIR 💻 CodeSpace 🐍 Python
📋

About this Digital Textbook

Fly with Python is a four-unit digital textbook that teaches Python programming through autonomous drone flight. Students write their first lines of code in CodeSpace, Firia's browser-based Python IDE, then progress to programming the CodeAIR drone's flight, sensors, and onboard logic.

Each unit breaks down into short, guided missions. Every mission ships with a complete teaching package: learning targets, classroom-ready lesson plans, key concepts, vocabulary, success criteria, assessment opportunities, and standards alignment. Pacing is yours: teach the missions in sequence over a semester, or pull them individually to fit a CS, robotics, or cross-curricular elective.

1

Unit 1: Drone Discovery

This unit introduces students to CodeSpace, Firia's Python IDE, and the CodeAIR drone. Across three guided missions plus a remix project and unit assessment, students get oriented to the IDE, meet the drone hardware, and write their first programs to control the drone, all without taking flight.

🗺️

Missions in this Unit

📐

Standards Addressed

CSTA Standards - Grades 6-8

2-CS-01 2-CS-02 2-CS-03 2-DA-09 2-AP-11 2-AP-12 2-AP-13 2-AP-14 2-AP-15 2-AP-16 2-AP-17

CSTA Standards - Grades 9-10

3A-CS-01 3A-CS-02 3A-CS-03 3A-DA-11 3A-AP-15 3A-AP-16 3A-AP-21 3A-IC-27

CSTA Standards - Grades 11-12

3B-CS-02 3B-AP-11 3B-AP-15 3B-AP-20 3B-AP-22 3B-AP-23

Additional Standards for Team Projects

2-AP-15 - Seek and incorporate feedback from team members and users to refine a solution that meets user needs.
2-AP-18 - Distribute tasks and maintain a project timeline when collaboratively developing computational artifacts.
2-AP-19 - Document programs in order to make them easier to follow, test, and debug.
3A-AP-19 - Systematically design and develop programs for broad audiences by incorporating feedback from users.
3A-AP-22 - Design and develop computational artifacts working in team roles using collaborative tools.
3A-AP-23 - Document design decisions using text, graphics, presentations, and/or demonstrations in the development of complex programs.
3B-AP-17 - Plan and develop programs for broad audiences using a software life cycle process.
3B-AP-20 - Use version control systems, integrated development environments (IDEs), and collaborative tools and practices (code documentation) in a group software project.
2

Unit 2: Drone Foundations

This unit prepares students to take CodeAIR airborne, safely. Students build a safety interlock with branching if statements, debounce button presses, wrap reusable behavior into functions, and explore the quadcopter power system. Later missions extend into flight maneuvers and autonomous operation.

🗺️

Missions in this Unit

  • Mission 4: Flight Safety: Students program a set of safety procedures using buttons, branching, debouncing, and a user-defined function to arm the drone.
  • Mission 5: Hovering Flight: Students program CodeAIR to avoid walls and seek an exit using sensors, custom modules, the MotionCommander interface, and variables.
  • Mission 6: Navigate: Students program CodeAIR to fly autonomously using sensor data, exploring the flow sensor for x/y position tracking, battery checks, binary LED patterns, exception handling with try blocks, and a selectable-operations user interface.
  • Unit 2 Remix & Assessment: Students apply skills from Missions 4-6 in an original CodeAIR remix project, and demonstrate mastery through the Unit 2 Assessment (review questions and rubrics).
📐

Standards Addressed

CSTA Standards - Grades 6-8

2-CS-02 2-DA-08 2-DA-09 2-AP-11 2-AP-12 2-AP-13 2-AP-14 2-AP-16 2-AP-17 2-AP-19

CSTA Standards - Grades 9-10

3A-CS-01 3A-CS-03 3A-DA-09 3A-DA-11 3A-AP-13 3A-AP-14 3A-AP-15 3A-AP-16 3A-AP-17 3A-AP-18 3A-AP-21 3A-IC-24 3A-IC-26

CSTA Standards - Grades 11-12

3B-CS-02 3B-NI-04 3B-DA-06 3B-DA-07 3B-AP-08 3B-AP-10 3B-AP-14 3B-AP-15 3B-AP-16 3B-AP-21 3B-AP-22 3B-AP-23

Additional Standards for Team Projects

2-AP-15Seek and incorporate feedback from team members and users to refine a solution that meets user needs.
2-AP-18Distribute tasks and maintain a project timeline when collaboratively developing computational artifacts.
2-AP-19Document programs in order to make them easier to follow, test, and debug.
3A-AP-19Systematically design and develop programs for broad audiences by incorporating feedback from users.
3A-AP-22Design and develop computational artifacts working in team roles using collaborative tools.
3A-AP-23Document design decisions using text, graphics, presentations, and/or demonstrations in the development of complex programs.
3B-AP-17Plan and develop programs for broad audiences using a software life cycle process.
3B-AP-20Use version control systems, integrated development environments (IDEs), and collaborative tools and practices (code documentation) in a group software project.
3

Unit 3: Drone Operations

This unit moves students into autonomous flight. Across four guided missions plus a remix project and unit assessment, students master the StateMachine task scheduler, formal state handlers, the flight data recorder, and sensor-driven event injection. They put it all together by programming CodeAIR to chart its own gyroscope data and run an autonomous survey of an object.

🗺️

Missions in this Unit

  • Mission 7: Multitasking: Students program a drone to perform multiple tasks at the same time without blocking program execution, using the StateMachine task scheduler to run non-blocking code for sounds, lights, and sensors.
  • Mission 8: Drone Director: Students combine the task scheduler with formal state handlers to fly precision flight profiles, using the flight data recorder, non-blocking flight commands, and event injection to direct CodeAIR like a film director directs a scene.
  • Mission 9: Attitude Control: Students explore CodeAIR's gyroscope to build a feedback system, charting roll rate live, redirecting chart data to the flight recorder, and using LEDs and motors to give the drone visual and haptic responses to tilt.
  • Mission 10: Survey: Students program an autonomous survey, flying CodeAIR around a box to detect corners, measure each side using state estimators and the Pythagorean Theorem, and capture the dimensions in a Python list.
  • Unit 3 Remix & Assessment: Students apply skills from Missions 7-10 in an original CodeAIR remix project, and demonstrate mastery through the Unit 3 Assessment (review questions and rubrics).
📐

Standards Addressed

CSTA Standards - Grades 6-8

2-CS-02 2-DA-08 2-DA-09 2-AP-11 2-AP-12 2-AP-13 2-AP-14 2-AP-16 2-AP-17 2-AP-19

CSTA Standards - Grades 9-10

3A-CS-01 3A-CS-03 3A-DA-10 3A-DA-11 3A-DA-12 3A-AP-16 3A-AP-17 3A-AP-18 3A-IC-26

CSTA Standards - Grades 11-12

3B-CS-02 3B-DA-05 3B-DA-06 3B-DA-07 3B-AP-10 3B-AP-12 3B-AP-14 3B-AP-15 3B-AP-16 3B-AP-21 3B-AP-22

Additional Standards for Team Projects

2-AP-15Seek and incorporate feedback from team members and users to refine a solution that meets user needs.
2-AP-18Distribute tasks and maintain a project timeline when collaboratively developing computational artifacts.
2-AP-19Document programs in order to make them easier to follow, test, and debug.
3A-AP-19Systematically design and develop programs for broad audiences by incorporating feedback from users.
3A-AP-22Design and develop computational artifacts working in team roles using collaborative tools.
3A-AP-23Document design decisions using text, graphics, presentations, and/or demonstrations in the development of complex programs.
3B-AP-17Plan and develop programs for broad audiences using a software life cycle process.
3B-AP-20Use version control systems, integrated development environments (IDEs), and collaborative tools and practices (code documentation) in a group software project.
4

Unit 4: Drone Intelligence

Unit 4 missions coming soon!