Robotics & Physical Computing

Lesson 3 of 7

Outputs & Actuators

Make things happen: lights, sounds, motors, servos and displays.

🟢 Beginner 55 XP

Learn it

Outputs let a computer affect the real world by producing light, sound or movement.

An LED is a simple digital output: it is either on or off.

A servo motor can move to a precise angle, which is useful for robot arms and steering.

Key terms

Actuator
A component that turns an electrical signal into physical action.
LED
Light-Emitting Diode: a small, efficient digital light source.
PWM
Pulse-Width Modulation: controlling power by switching it on and off very quickly.
Servo Motor
A motor that can be set to a specific angle and hold that position.

Output Examples

Different jobs need different actuators.

  1. 1Warning light: A red LED flashes when a sensor detects a problem.
  2. 2Robot wheels: Two DC motors move the robot forwards, backwards and turn.
  3. 3Robot arm: Servo motors position each joint at a precise angle.
  4. 4Alarm: A buzzer or speaker produces sound when triggered.

Blinking an LED with PWM

pythonfrom microbit import *

# Pin 0 controls an external LED
while True:
    for brightness in range(0, 1024, 64):
        pin0.write_analog(brightness)
        sleep(20)
    for brightness in range(1023, -1, -64):
        pin0.write_analog(brightness)
        sleep(20)

PWM rapidly switches the LED on and off. A higher average voltage makes the LED brighter, creating a smooth fade effect.

Try it

Are these statements about outputs true or false?

A servo motor is useful when you need to move to a precise angle.

PWM can only turn an LED fully on or fully off.

A buzzer is an example of an actuator.

DC motors are best for holding an exact position without extra sensors.

Challenge

You need to build a small automated gate for a model car park. Which output would you choose: a DC motor, a servo motor, or a stepper motor? Justify your answer.

Pick whichever way suits you — every mode earns the same bonus XP.

Write at least 40 more characters to submit.

Mark your own work

Guided walkthrough — 0/5 clues revealed

  1. Clue 1 locked — reveal it only if you get stuck.
  2. Clue 2 locked — reveal it only if you get stuck.
  3. Clue 3 locked — reveal it only if you get stuck.
  4. Clue 4 locked — reveal it only if you get stuck.
  5. Clue 5 locked — reveal it only if you get stuck.

Each clue costs 3 XP (never below 14 XP). You'd earn 28 XP right now.

Extension: Describe how you would add a safety light that turns on while the gate is moving.

Quiz time

Question 1 of 3Score 0

What does PWM stand for?