From Code to Flight: How Drones Are Transforming the Way Students Learn Computer Science

From Code to Flight: How Drones Are Transforming the Way Students Learn Computer Science

As an educator who is passionate about meaningful learning, I’ve long sought ways to bridge abstract concepts with concrete, hands-on experiences. For this school term, I ventured into uncharted airspace: teaching high school students to code drones.

We live in a time when solutions are cheap and plentiful. Search engines return several step-by-step guides leading to the same result in seconds, and AI will assemble an assortment of plausible drafts with one simplistic command followed by a few options to expound. With 12 indoor drones and 25 eager learners, I designed a unit that combined computational thinking with creativity, collaboration, and reflection. Rather than simply dictating a coding unit, I challenged myself to reimagine it as a dynamic experience of thinking and learning visibly. Utilizing thinking routines, my goal was not only for students to write code but to see their thinking, test it in real time, and revise it together as a group.

Students were paired in small teams, each becoming a mini-lab of innovation. They began by observing a flight problem or motion challenge. Before touching the keyboard, they used See–Think–Wonder routines to map the drone’s expected movements with pen and paper. They translated their ideas into pseudocode — early sketches of logic — and only after this process did they begin the actual programming using a browser-based IDE.

Our classroom transformed into a buzzing hub of experimentation. Drones zipped across our designated flight zone while voices echoed with questions, suggestions, and bursts of celebration. There were no passive learners. Everyone was either flying their drone, debugging code, or reflecting on how to improve. Students taught each other, revised code collaboratively, and problem-solved with visible perseverance. When something didn’t work, they paused, re-evaluated, and tried again.

“What makes you say that?” or “Why did you do it that way?” prompted the interaction during coding peer reviews. The students were reinforcing the concept that “critiquing” each other’s work is not the same as “being critical,” the former being a helpful skill that has often been misinterpreted as negative or hateful throughout the social media sphere of keyboard warriors. When face-to-face with deadlines to meet, classmates soon recognized the benefits of positive approaches to group problem solving and how honest, constructive appraisals help cut to the chase.

Each learner documented their journey through an individual website portfolio that aggregated their code, schematics, videos of drone flights, and personal reflections. These digital repositories became living artifacts of their growth.

As coding skills soared, the successful launch of this project should be rightfully credited to individual and group resilience. Watching students lean into their struggles, persist through logic errors, and jointly celebrate every small win reminded me of why I teach. In this environment, collaboration was the engine.

Article content

This is part of a reflection of one of my students:

“Over the past seven weeks of coding a drone, I have learned a lot, not just about how to move a drone, but how to actually use code to make it happen. When we first started, I had never coded a drone before and I had no idea what to expect. Come on, it was all about deconstructing the basic commands like pair(), takeoff(), hover(), move(), and land(). But as the weeks went by, the problems became more challenging, and I got better at writing code that successfully caused the drone to move in the direction that we wanted.” – Student

One of the things I enjoyed most about this unit was seeing how code is actually capable of causing something to happen in the real world. As opposed to normal coding practice that just stays on a screen, this exercise had us flying something in real life. It made it more exciting and more frustrating at the same time. Sometimes the drone would not act the way we wanted it to, and we would need to troubleshoot and figure out why. Those small errors taught us about the importance of testing, fine-tuning values, and being very accurate.

The most beneficial information I gained was the use of loops to make our code easier to write and to write more easily. We initially wrote step by step, and indeed it worked, yet it was hard and hard to fix. Once we learned how to utilize ‘apply’ for loops, we could iterate movements like square or triangle movement without having to cut and paste. This made it incredibly easy to change values or test different speeds and angles.

Eventually, we started using functions, especially when we did more intricate flight paths like circular movement. That taught me how much of a good thing it is to break up code into smaller segments that you can reuse. It made everything more organized and kept us from duplicating ourselves so much. Something that I would certainly do if I did a bigger project in the future.

We also spent a great deal of time manipulating pitch, yaw, roll, and throttle to create movement. Knowing how these controls work and what they do to the drone’s direction was a big part of being able to create more complex patterns like zig-zags or curves. At first, it was confusing trying to use yaw and pitch at the same time, but with practice and experimenting, I was able to feel more comfortable using it.

Overall, this project was a really great combination of learning to code, having hands-on experience with real equipment, and collaborating with partners. I felt like the lessons were incredibly well-designed, each one built on what we’d done previously, and by the end of it we were doing really advanced things like having the robot fly in circles or switch through LED colors. I’m happy with how much we accomplished and how much I improved in such a short time.

And we’re just getting started.

Now that this group has mastered individual tasks, they are preparing a full drone choreography featuring twelve drones, three teams, and one shared vision. Our room will become a creative stage featuring code that synchronizes all of the movements and sounds in one electrifying performance.

Article content

I can’t wait to share how this unfolds in the next chapter. Stay tuned. The future of learning is airborne!

Originally published July 13th, 2025 on LinkedIn