Lesson 3 of 7
Input and Output
Explore how computers interact with the outside world using diverse input sensors and output devices.
Learn it
Computers need ways to sense the world around them and communicate back to us. We do this using Input and Output devices (often called I/O).
Input devices send data into the computer. Keyboards, mice, microphones, touchscreens, and cameras are classic examples. Even the GPS sensor in your phone is an input device!
Output devices take processed data from the computer and present it to humans. Screens show pictures, speakers play sounds, and printers put ink on paper.
Key terms
- Input Device
- Any hardware peripheral that gathers data from the outside world and sends it to a computer.
- Output Device
- Any hardware peripheral that translates processed computer data into a human-perceivable or physical form.
- Sensor
- An input device that detects and measures physical properties like temperature, light, motion, or pressure.
- Actuator
- A mechanical output device that produces physical movement based on electrical computer signals, like a robotic arm motor.
Autonomous Cars and I/O
Self-driving cars rely on an array of advanced I/O devices to navigate roads safely.
- 1Sensory Input: LiDAR lasers, radar sensors, and HD cameras constantly stream distance and image data into the onboard computer.
- 2Processing: AI algorithms analyse the incoming sensor feeds to detect pedestrians, lane markings, and traffic lights.
- 3Mechanical Output: Actuators turn the steering wheel, apply hydraulic brakes, and adjust the electric motor throttle.
- 4Display Output: Dashboard screens and audio alerts inform the driver of lane changes and speed limits.
Simulating I/O Sensor Thresholds
python# Simulating an automated greenhouse monitoring system
def check_greenhouse_sensors(temperature_celsius, light_level_lux):
# INPUT: Sensor readings received as parameters
print('Reading sensor telemetry...')
# PROCESS: Evaluate conditions against thresholds
fan_active = temperature_celsius > 28.0
grow_lights_active = light_level_lux < 300
# OUTPUT: Actuator decisions
print('Ventilation Fan Status:', 'ON' if fan_active else 'OFF')
print('Grow Lights Status:', 'ON' if grow_lights_active else 'OFF')
# Test with hot, dim conditions
check_greenhouse_sensors(31.5, 180)This code demonstrates how sensor inputs are processed using logical rules to trigger automated physical outputs like fans and lighting.
Try it
Evaluate whether these statements about Input and Output devices are True or False.
A barcode scanner in a supermarket checkout is an input device.
A computer monitor screen is classified as an input device.
A haptic vibration motor inside a games controller is an output device.
A smartphone touchscreen operates solely as an output device.
Challenge
Design an automated smart-pet feeder. List at least two input devices and two output devices it would require to function autonomously.
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
- Clue 1 locked — reveal it only if you get stuck.
- Clue 2 locked — reveal it only if you get stuck.
- Clue 3 locked — reveal it only if you get stuck.
- Clue 4 locked — reveal it only if you get stuck.
- Clue 5 locked — reveal it only if you get stuck.
Each clue costs 3 XP (never below 15 XP). You'd earn 30 XP right now.
Extension: Explain how an analogue-to-digital converter (ADC) enables continuous real-world sensor values (like temperature) to be understood by a digital computer.