Year 7 Digital Technologies

Drones and Automated Robotics

Today you will take the controls of a real drone, then program a robot that can think for itself. Two missions. One lesson. Let's go.

CoDrone EDU drone Friendly robot illustration
1
Flight Control Challenge

Fly the CoDrone around a course. This can be programmed, but today you will pilot it manually.

2
Robotaxi Challenge

Program a LEGO Spike Prime driving unit to drive itself, and to mimic the safety auto-stop features of modern cars.

Case Study

Robotaxis in the Real World

Waymo — Phoenix, Arizona, USA

In Phoenix, you can pull out your phone, open an app, and order a taxi that arrives with nobody in the driver's seat. Waymo's robotaxis have been carrying paying passengers around the city since 2020, and the fleet now completes hundreds of thousands of driverless trips every week across several American cities. Each car uses spinning laser scanners (LiDAR), radar and cameras to build a 3D picture of the world around it, and an onboard computer makes every steering and braking decision.

It sounds like the future has arrived, but running a robotaxi fleet is harder than it looks. The cars sometimes freeze when they meet something they have never seen before, such as roadworks, hand signals from a police officer, or a plastic bag blowing across the road. Confused robotaxis have stopped in the middle of intersections and blocked traffic until a remote human operator stepped in to help. They also have to cope with unpredictable pedestrians, cyclists, dust storms, and even people deliberately pranking or vandalising the vehicles. And behind it all sits one big question: when there is no driver, who is responsible if something goes wrong?

Think about it: A pedestrian suddenly steps out in front of a robotaxi. What does the car need to sense, decide and do in less than a second? Keep this in mind, because later today you will build exactly that safety feature.
Know Your Machines

What Is a Robot, Anyway?

A robot is a machine that can sense its surroundings, make decisions using a program, and then act on those decisions, all without a human controlling every move. Engineers call this the sense → think → act loop, and it runs over and over, many times every second.

SENSE → THINK → ACT

Sensors gather data → the program decides → motors do something → repeat.

A washing machine follows a fixed cycle no matter what, so it is just a machine. A robot vacuum that detects a wall, decides to turn, and drives a new path is a robot. Your Spike Prime robotaxi will be a robot too: its distance sensor senses, your code thinks, and its motors act.

So where do drones fit in? A drone is any aircraft with no pilot on board. Here is the catch: most drones, including the CoDrone you will fly today, are remote-controlled, which means a human is doing the thinking. A remote-controlled drone is not really a robot. But load a drone with sensors and a program so it can fly a route, dodge obstacles and land by itself, and it becomes a flying robot. It is not about what the machine looks like; it is about who, or what, is doing the thinking.

Drone (remote-controlled)Robot (autonomous)
Who thinks?The human pilot on the controllerThe onboard program
SensorsUsed mainly to stay stable in the airUsed to make decisions
If a wall appearsCrashes, unless the pilot reactsDetects it and responds by itself
ExampleCoDrone flown with a controllerWaymo robotaxi, robot vacuum, your Spike Prime

Today you get to be both sides of that table: first the human pilot, then the programmer who hands the thinking over to the machine.

Mission 1 — Flight

CoDrones: Flight Control Challenge

Flying pig animation

Battery life is a constraint here, so you will not have long to fly the drone. At take-off, you will have only 1 minute to familiarise yourself with the flight controls. It is not long, but we need to make sure the battery lasts so everyone gets a chance to fly.

Your challenge is to fly the drone around, and under, the table, and then to land back on top of the box.

Top view — full circle around the table

TABLE GO your drone

Take off, then fly one complete lap around the outside of the table without touching it.

Side view — under the table, land on the box

TABLE BOX gentle landing = 2 points

Fly low and steady beneath the tabletop, come out the other side, climb, and touch down on top of the box.

Scoring

1 ptNo crashes
1 ptFull circle around the table
1 ptSuccessful transit under the table
2 ptsBox-top landing

Score at least 3 points by the end of your turn and you win a prize.

1:00 Once 1 minute has passed, you will need to land the drone so the next pilot gets their turn.
Mission 2 — Ground

LEGO Spike Prime — Robotaxi

Remember the Waymo case study? A robotaxi is useless, and dangerous, if it cannot stop for pedestrians. Time to build that safety system yourself.

You will be shown how to connect your robot in class, and how to tell what ports each of the peripheral sensors and motors use.

Your challenge: Using the commands below, figure out a method to get your robot to travel forwards, and to automatically stop when a pedestrian walks in front of it. Your robot's distance sensor is its eyes; your code is its brain.
Example SPIKE word blocks: when program starts, set movement motors, move forward, wait until distance sensor is closer than a set distance, stop moving

These are examples of the specific code blocks you can use to complete the challenge. Think about the order they need to run in.

What can you adjust to make your robot more accurate? Think about the stopping distance, the driving speed, and how often the sensor checks for obstacles.

Extension: Spend the remainder of the lesson experimenting with the code to see what else you can get your robotaxi to do. Could it beep a horn before stopping? Reverse away? Steer around the pedestrian and continue its trip?