Guided Demonstration

Guided Demonstration

LED Traffic Light

Keep a tiny intersection orderly with outputs, timing, and a sequence that does not show red and green together.

  • Output
  • Sequences
  • Timing
  • Loops
  • State
  • Debugging

Visible system / hidden curriculum

Build something clear enough to test.

What students build

  • Three visible light states
  • A timed sequence
  • Safe transition rules
  • Optional pedestrian request
  • Repeat behaviour
  • Reset state

What students learn

  • Digital output
  • Sequence timing
  • State transitions
  • Loops
  • Safety constraints
  • Testing impossible combinations

What students need

  • Browser circuit simulator or paper state diagram
  • Optional LEDs and suitable supervised components

Hardware is optional. A physical version requires suitable teacher-arranged components and supervision; equipment availability is confirmed separately.

Suggested build order

Decisions and checkpoints, not a wall of copied blocks.

Students may use different artwork and implementation details. The shared structure keeps the concept teachable.

  1. 01

    Name the states

    Task: Define STOP, READY, and GO before wiring or coding.

    Build and test this part before adding the next system.

    Checkpoint
    Each state has one light pattern.
    Likely mistake
    Starting with timing before defining states.
  2. 02

    Build one output

    Task: Make one simulated or physical LED respond.

    Build and test this part before adding the next system.

    Checkpoint
    The output can turn on and off reliably.
    Likely mistake
    Using an incorrect output or connection.
  3. 03

    Create the sequence

    Task: Move through states in a safe order.

    Build and test this part before adding the next system.

    Checkpoint
    Red and green are never active together.
    Likely mistake
    Several scripts control the same lights.
  4. 04

    Add timing

    Task: Choose readable delays and repeat the cycle.

    Build and test this part before adding the next system.

    Checkpoint
    A full cycle is easy to observe.
    Likely mistake
    Delays are too short to inspect.
  5. 05

    Test a request

    Task: Optionally add a button-request state without interrupting unsafely.

    Build and test this part before adding the next system.

    Checkpoint
    The request is handled at a defined point.
    Likely mistake
    Button input jumps directly to an unsafe state.

Test it

Try the edges, not only the easy success.

  • Can red and green appear together?
  • Does restart begin from STOP?
  • Can a request interrupt any state?
  • Does the loop preserve sequence order?
  • Can every output be tested alone?

Common mistakes

Read the clues before changing code.

  • Outputs are controlled from competing scripts.
  • Timing hides a wrong state order.
  • Reset begins at an unsafe state.
  • A button press is read but not acknowledged.

Improve it

Preserve the core system while changing the project.

  • Add a pedestrian signal.
  • Display the current state.
  • Add a night flashing mode.
  • Draw a complete state transition map.

Challenge levels

Choose meaningful difficulty.

LEVEL 1

Builder

Create a reliable three-state loop.

LEVEL 2

Inventor

Add a queued pedestrian request.

LEVEL 3

Boss Level

Design and test normal and night operating modes.

Show-teacher checkpoint

Demonstrate the working decisions.

  • State diagram
  • Three outputs
  • Safe sequence
  • Readable timing
  • Complete reset
  • One impossible-state test