Skip to main content

From pilot to programmer

For two days you’ve flown your drone by hand. Today it levels up: instead of you holding the sticks, your code flies the drone. You’ll give it a list of instructions - take off, fly forward, spin, land - and it carries them out on its own.
Block coding concept: a stack of drone command blocks

You snap together blocks, and the drone flies the program

What is a program?

A program is just a list of instructions a computer follows in order. You already think this way - a recipe or a set of directions is a program for a person. A drone program is a set of steps for the drone:
The computer does each step exactly, in order, every time - which is why code can fly a path far more precisely than your hands can.
A program compared to a recipe, with numbered steps the drone follows in order

A program is a recipe: the drone follows your steps in order, exactly, every time

Instructor prompt: Ask a student to give you step-by-step directions to make a peanut butter sandwich - then follow them too literally (e.g. “put peanut butter on bread” → smear the jar on the loaf). Kids learn instantly that computers do exactly what you say, not what you mean. This is the single most important idea of the whole day.

The three things every program does

Almost every program - from a drone flight to a video game - is built from just three simple ideas. You’ll use all three this week:

Sequence

Steps run in order, top to bottom. Take off before you fly forward.

Loops

Repeat steps without copying them. Fly a square with one small loop instead of eight blocks.

Decisions

If-then choices let a program react - “if battery is low, land.” (You’ll dig into these on Day 5.)

Block coding

You’ll write programs by snapping together blocks - no typing, no syntax errors. Each block is one instruction (like “take off” or “fly forward”). You drag them into order and press play. It’s the same idea as Scratch, and it’s how most people start coding.
Comparison of block coding and the equivalent JavaScript text code

Blocks on the left, the real JavaScript they stand for on the right - same program, two views

Blocks aren’t “fake” coding - each block stands for a real line of code. Later today you’ll flip a switch and watch your blocks turn into professional JavaScript, the same language that runs most of the web.

Meet echo.pitsco.com

This week’s coding tool is echo.pitsco.com - a free website that talks to your drone. There’s nothing to install and no account needed.
The echo.pitsco.com interface showing the toolbar and block categories

The echo.pitsco.com workspace once your drone is connected

Here’s what you’ll see:

Block categories (left)

Flight, Control, Loops, Variables, and Functions - each is a drawer of blocks you drag into your program.

Toolbar (top)

FILE, EDIT, CONNECT, START PROGRAM, and LAND NOW control your drone and your work.

Your save code (top center)

A short code (like FZD6O4) that saves your work so you can continue later with I have a code.

Blocks / Javascript (bottom right)

Switch between drag-and-drop blocks and real JavaScript with the Views toggle.
echo.pitsco.com connects to your drone over Bluetooth, straight from your web browser. Open the site in Google Chrome or Microsoft Edge (Bluetooth coding isn’t supported in Safari).

Bluetooth vs the controller

Your drone can listen to the controller or to your code, but not both at once:
  • Controller (Days 1-2): you fly by hand with the joysticks.
  • Bluetooth code (today): the website sends your program to the drone.
When you connect the drone to echo.pitsco.com, the handheld controller won’t work - the drone is now listening to your code. That’s expected.

Why code a drone at all?

Precision

Code repeats the exact same flight every time. Your hands never will.

Repeatability

Run the same mission a hundred times - for inspections, mapping, or delivery.

Autonomy

A coded drone flies itself. Real drones survey fields and film movies with no pilot touching the sticks.

Superpowers

Loops, timers, and decisions let one program do things no human pilot could do by hand.

Talk about it

Discussion prompts to keep the room buzzing:
  • What’s a “program” you follow every morning before school? (A morning routine is a sequence!)
  • If a self-driving car ran its instructions too literally, what could go wrong?
  • Would you rather fly the drone by hand or write code that flies it perfectly every time? Why?
You can explain what a program is, name the three building blocks of every program (sequence, loops, decisions), name the five block categories in echo.pitsco.com, and describe how it connects to your drone.