Topic Guide

Input and Output

Input enters a system. The code handles it, and an output makes the result visible, audible, or physical.

Why this matters

A key press can move a sprite. A button can light an LED or sound a buzzer. Students identify the signal coming in, then write the rule that produces the response.

Beyond this topic

A doorbell turns a button press into sound. A keyboard game does the same sort of work with keys and sprites; a microcontroller uses pins, LEDs, motors, and buzzers.

Math and logic

Input

A signal or value the program can read.

Processing

The rule applied to that information.

Output

The resulting movement, light, sound, or display.

Mapping

The chosen connection between an input and its response.

Small examples

1

Keyboard to movement

Connect four keys to changes in x and y.

2

Button to buzzer

Play a sound when a button is pressed.

3

Timer to display

Show the measured time as a number.

4

Sensor to motor

Change the motor command after a reading crosses a threshold.

Program connections

Where this topic appears.

Active now

Scratch & Game Design

Students author games, animations, simulations, and strange interactive stories while learning how events, rules, and state fit together.

Active now

Robotics

Students write commands, wire simple circuits, read sensors, and trace physical cause and effect through the Sense–Decide–Act loop.

Coming later

Roblox Studio / Lua

A possible later step from visual programming into Lua, 3D objects, events, and larger game rules.

Common mistakes

Input never read

The output code exists, but nothing checks the control.

Competing inputs

Two controls try to set the same output with no priority rule.

Wrong pin or object

The code listens somewhere other than where the component is connected.

Silent response

There is no visible sign that the input was received.

Put the idea to work

Read the Lesson
Robotics Guided Project

Button and Buzzer Alarm

Connect a button to a visible and audible alarm, then write clear rules for arming, triggering, and resetting it.

  • Input
  • Output
  • Events
  • Conditions
See how it works
Robotics Guided Project

LED Traffic Light

Program a timed traffic light, then add a pedestrian request without creating an unsafe transition.

  • Output
  • Sequences
  • Timing
  • Loops
See how it works