Example robot: drones

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

Example robot: drones

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. Which statement about a drone is correct?
A A drone is just a toy that has no electrical parts or program
B A drone is a flying robot with a frame, rotors, electrical parts and a program
2. Which part of a drone is its mechanical structure?
A The frame and rotors
B The microprocessor and sensors
3. What do the sensors on a drone do to help it stay level in the air?
A They spin to make the drone fly upwards
B They measure its tilt and position and send the data to the microprocessor
4. What does the microprocessor do when a sensor shows the drone is tilting?
A It processes the sensor data and tells the motors to change speed
B It measures the tilt itself and turns the rotors directly
5. Which drone is flying by remote control?
A A drone whose movements are steered by a person using a handset
B A drone that follows a route stored in its program with no one steering

Match the Pairs

Draw a line connecting each item on the left to its match on the right.

Left columnRight column
1rotors AA sensor reading is used by the program to adjust the rotors and keep the drone level
2IF tilt_sensor = "left" THEN speed_up_right_rotors BA drone has a frame and rotors, not wings, and it needs electrical components such as sensors, a microprocessor and motors to be a robot.
3An autonomous drone follows a programmed route without a pilot, so it still counts as a robot CThe spinning blades turned by motors that push air down and lift the drone into the air
4A remote-controlled drone is flown by a human pilot who sends commands from a handset DIF stick_pushed = "forward" THEN move_forward
5A drone is a robot because it has wings and no electrical parts EA drone needs a program that controls its flight to be a robot, because the microprocessor must run instructions.
6A drone flown only by remote control with no program is a robot FFOR each waypoint IN route: fly_to(waypoint)

Definitions

drone

Fill in the Blanks

Complete each line of code by filling in the missing parts.

1.
FOR rotor ← 1 TO _ spin(rotor) NEXT rotor
2.
IF tilt > 0 ____ correctTilt() ENDIF
3.
_____ command IF command = "UP" THEN climb()
4.
WHILE battery _ 20 flyTo(nextPoint) ENDWHILE
5.
hasFrame ← TRUE hasElectrics ← TRUE isRobot ← hasFrame ___ hasElectrics

Spot the Error

Shade in the letter of the line that contains an error.

Question 1
A WHILE battery > 20
B READ gyroscope
C IF tilt <> 0 THEN
D ADJUST sensors
E ENDIF
F ENDWHILE
Question 2
A frame ← carbon fibre
B rotors ← 4
C OUTPUT frame, rotors
Question 3
A OUTPUT mode
B IF mode = "route" THEN
C FOLLOW route
D ENDIF
Question 4
A altitude ← 0
B WHILE altitude < 30
C altitude ← altitude - 5
D ENDWHILE
Question 5
A tilt ← READ gyroscope
B IF tilt > 0
C CALL levelDrone()
D ENDIF

Answer Key

Example robot: drones
Section A: Quick Questions
Q1
B — A drone is a flying robot with a frame, rotors, electrical parts and a program
Q2
A — The frame and rotors
Q3
B — They measure its tilt and position and send the data to the microprocessor
Q4
A — It processes the sensor data and tells the motors to change speed
Q5
A — A drone whose movements are steered by a person using a handset
Section B: Match the Pairs
Q1
rotors → The spinning blades turned by motors that push air down and lift the drone into the air
Q2
IF tilt_sensor = "left" THEN speed_up_right_rotors → A sensor reading is used by the program to adjust the rotors and keep the drone level
Q3
An autonomous drone follows a programmed route without a pilot, so it still counts as a robot → FOR each waypoint IN route: fly_to(waypoint)
Q4
A remote-controlled drone is flown by a human pilot who sends commands from a handset → IF stick_pushed = "forward" THEN move_forward
Q5
A drone is a robot because it has wings and no electrical parts → A drone has a frame and rotors, not wings, and it needs electrical components such as sensors, a microprocessor and motors to be a robot.
Q6
A drone flown only by remote control with no program is a robot → A drone needs a program that controls its flight to be a robot, because the microprocessor must run instructions.
Section C: Definitions
Q1
drone — A flying robot with a frame and rotors, sensors, a microprocessor and motors, and a program that controls its flight, either by remote control or by following a programmed route.
Section D: Fill in the Blanks
Q1
FOR rotor ← 1 TO 4 spin(rotor) NEXT rotor
Q2
IF tilt > 0 THEN correctTilt() ENDIF
Q3
INPUT command IF command = "UP" THEN climb()
Q4
WHILE battery > 20 flyTo(nextPoint) ENDWHILE
Q5
hasFrame ← TRUE hasElectrics ← TRUE isRobot ← hasFrame AND hasElectrics
Section E: Spot the Error
Q1
D — A sensor only gathers data. The motors are the actuators that change the rotor speeds to level the drone, so line 4 should be ADJUST motors.
Q2
A — The frame material is text, so it must be in quotes. Without the quotes the program treats carbon and fibre as variable names. It should be frame ← "carbon fibre".
Q3
A — The drone must receive the chosen mode (remote control or programmed route), so line 1 should be INPUT mode. OUTPUT would only display a value that does not exist yet.
Q4
C — The drone is climbing to 30 m, so the altitude must increase. Subtracting would make the loop run forever. It should be altitude ← altitude + 5.
Q5
B — An IF statement needs the keyword THEN at the end of the condition. Line 2 should be IF tilt > 0 THEN.