The Fly with Python Digital Textbook
12 missions of scaffolded, standards-aligned Python curriculum - paired with the CodeAIR autonomous drone. Students program navigation, computer vision, and machine learning through projects where real flight is the ultimate test. Unforgettable STEM experiences for grades 6 and up.
Get the CodeAIR Lab KitFrom First Line of Code to Autonomous Flight
CodeAIR is the first educational drone where student code flies onboard - an open platform for creative exploration of the sensors, motors, and software that make drones fly. Students learn real Python while building programs that control a real aircraft.
Across 12 missions, students progress from blinking LEDs to programming autonomous flight with laser range sensors, flow-based navigation, computer vision, and even building their own ground control station with a CodeX controller. Every concept is tested by actual flight - the drone either holds altitude or it doesn't, navigates the course or it doesn't. The hardware is honest - and overcoming that honest feedback is where real confidence comes from.
87 objectives. 27 quizzes. Hundreds of guided coding steps. Each mission includes interactive CodeTrek walkthroughs, built-in hints, and automatic goal validation. Note: the Machine Learning with TensorFlow Mission Pack is coming soon as an advanced add-on.
Mission-by-Mission Breakdown
Each mission is a hands-on drone project that teaches new Python concepts through the CodeAIR. Click any mission to see its objectives.
Mission 1: Welcome
Take a tour of the CodeSpace development environment. Students learn how the text editor, Toolbox reference, and simulation controls work before writing any code.
Key concepts: CodeSpace IDE, text editor, Toolbox, simulation
Objectives
- Mission Objectives
- Text Editor
- Tool Box
- Simulation Controls
Mission 2: Introducing CodeAIR
Get to know the CodeAIR drone! Students explore the hardware - static electricity safety, the CPU, power switch, and USB connection. Then they connect to CodeSpace and light up the LEDs with their first Python program.
Key concepts: Hardware orientation, static safety, USB connection, LED control, CodeTrek
Objectives
- Behold the CodeAIR
- Static Electricity
- Find the CPU
- Power Switch
- Connect the USB
- Link to CodeSpace
- Save the Code!
- The CodeTrek
- Light's On
- More Lights
Mission 3: Pre-Flight Check
All systems GO for takeoff? Students test out basic Python coding to control CodeAIR's lights and sounds - learning loops, LED patterns, and color control while building their pre-flight checklist.
Key concepts: Loops, LED patterns, RGB color, sound output, pre-flight procedures
Objectives
- Lighting Beacon
- Loop de Loop
- Light Cycle
- Fancy LED Fix
- Wild Blue Yonder
- In Living Color
- Sky Lights
- Aero Lights
Mission 4: Flight Safety
Good drones don't jump into the sky unexpectedly! Students code a safety interlock system with debouncing, countdown timers, motor tests, and custom functions - ensuring CodeAIR stays grounded until the pilot is ready.
Key concepts: Safety interlocks, debouncing, countdown, functions, motor control
Objectives
- Arm
- Debounce
- Countdown
- Motor Test
- Functions
- Torque
Mission 5: Hovering Flight
Take off! Students get their drone in the air for autonomous hovering and explore the laser range sensors - building obstacle detection, flight ceilings, hall monitoring, and an escape bug algorithm.
Key concepts: Autonomous hover, laser range sensors, obstacle detection, altitude control
Objectives
- Modular
- Hover
- Moving Forward
- Quadcopter Sensors
- Back Off!
- Flight Ceiling
- Theremin
- Hall Monitor
- Obstacle Detection
- Escape Bug
Mission 6: Navigate
Navigate the skies using CodeAIR's flow sensor for ground-based positioning. Students fly square patterns, learn rotation control, build selectable flight operations, and become test pilots for their own code.
Key concepts: Flow sensor, positioning, rotation, battery monitoring, selectable operations
Objectives
- Positioning with Flow
- Square Up!
- Rotate
- Battery Check
- Selectable Ops
- Crash Testing
- Test Pilot
Mission 7: Multitasking
Unlock true drone multitasking! Students use the task scheduler to run multiple independent code sequences at once - from sensor checks to output signals - solving the blocking problem that limits sequential code.
Key concepts: Task scheduler, concurrent execution, blocking vs non-blocking, sensor reflexes
Objectives
- Task Master
- Juggling Two Tasks
- The Blocking Roadblock
- The Non-Blocking Fix
- Sensing While Scheduling
- Simple Sensor Reflex
Mission 8: Drone Director
Apply state machines to direct aerial sequences while running background tasks in parallel! Students build flight recorders, formal state systems, and a complete drone director program.
Key concepts: State machines, flight recording, parallel tasks, program architecture
Objectives
- Tasked Flight
- Flight Recorder
- Flight Fix
- Formal States
- Keep It Steady
- Drone Director
Mission 9: Attitude Control
Feel the forces of flight! Students go hands-on with the gyroscope to build a haptic feedback system, chart drone attitude, detect dips, and discover the secrets of drone stability through multi-axis control.
Key concepts: Gyroscope, attitude angles, haptic feedback, multi-axis control, stability
Objectives
- What's Your Angle?
- The Gyroscope Discovery
- Charting Your Attitude
- Painting with Physics
- Dip Detector
- Feel the Force
- Multi-Axis Corner Control
- Spin Cycle
Mission 10: Survey
Develop a cutting-edge mapping drone! Students use CodeAIR's sensors to autonomously survey the landscape - taking measured moves, going wide, and collecting distance measurements.
Key concepts: Autonomous survey, measurement, grid navigation, data collection
Objectives
- Closer Look
- Measured Moves
- Go Wide
- Corner 2
- Measurement
Mission 11: Reconnaissance
Master CodeAIR's camera to gather visual intel! Students learn frame grabbing, aerial photography, position tracking, and waypoint-based navigation to fly precise reconnaissance routes.
Key concepts: Camera, frame capture, aerial photography, waypoints, planned navigation
Objectives
- Frame Grab
- Selfie Cam
- Aerial Photography
- Position Tracking!
- First Waypoint!
- Spycraft
Mission 12: Telemetry
Want a remote controller for CodeAIR? Build it yourself with Python! Students create a ground control station using a CodeX as a controller - with pixel art displays, live instrument panels, radio communication, and analog stick control.
Key concepts: Radio telemetry, instrument panels, analog control, ground station, CodeX integration
Objectives
- Ground Control
- Pixel Art
- Instruments Panel
- Altitude and Airspeed
- Live Gauges
- Pair Up
- On the Air
- Comms Check
- Analog Sticks
- Cleared for Takeoff
- Remix: Custom HUD