Guided Class Project

Guided Class Project

Button and Buzzer Alarm

Protect a small imaginary vault with an alarm useful enough to detect a press and polite enough to stop.

  • Input
  • Output
  • Events
  • Conditions
  • State
  • Circuits

Visible system / hidden curriculum

Build something clear enough to test.

What students build

  • A button input
  • A buzzer or simulated sound
  • Visible status output
  • Armed and disarmed states
  • Acknowledgement or reset
  • Test cases

What students learn

  • Input-process-output
  • Digital signals
  • Conditions
  • State
  • Feedback
  • Circuit or simulation debugging

What students need

  • Browser circuit simulator
  • Optional button, buzzer, microcontroller, and suitable supervised components

Hardware is optional. A physical build depends on teacher-arranged components and safe volume limits; no equipment inclusion is promised here.

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

    Read the button

    Task: Display or log pressed and not-pressed states.

    Build and test this part before adding the next system.

    Checkpoint
    Input changes are visible.
    Likely mistake
    Code listens to the wrong input.
  2. 02

    Control one output

    Task: Connect the input condition to sound or a simulated buzzer.

    Build and test this part before adding the next system.

    Checkpoint
    The output responds for a clear reason.
    Likely mistake
    The buzzer never turns off.
  3. 03

    Add visible feedback

    Task: Show ARMED, TRIGGERED, or DISARMED.

    Build and test this part before adding the next system.

    Checkpoint
    The current state is always understandable.
    Likely mistake
    Display and output disagree.
  4. 04

    Create reset behaviour

    Task: Choose how the alarm stops and returns to armed.

    Build and test this part before adding the next system.

    Checkpoint
    Reset does not immediately retrigger.
    Likely mistake
    The pressed button remains true during reset.
  5. 05

    Test sequences

    Task: Try press, hold, release, reset, and repeated press.

    Build and test this part before adding the next system.

    Checkpoint
    Every sequence has a defined result.
    Likely mistake
    Only a quick tap is tested.

Test it

Try the edges, not only the easy success.

  • What happens while the button is held?
  • Can the alarm be disarmed?
  • Does reset retrigger immediately?
  • Does visual state match sound?
  • Can repeated presses break state?

Common mistakes

Read the clues before changing code.

  • The output has no off path.
  • State display is decorative rather than connected.
  • Reset ignores the current input.
  • Sound volume or duration is not considered.

Improve it

Preserve the core system while changing the project.

  • Add a delay before arming.
  • Require an acknowledgement input.
  • Count trigger events.
  • Create a silent visual alarm mode.

Challenge levels

Choose meaningful difficulty.

LEVEL 1

Builder

Make press and release behaviour reliable.

LEVEL 2

Inventor

Add armed, triggered, and reset states.

LEVEL 3

Boss Level

Design two inputs and a clear alarm priority rule.

Show-teacher checkpoint

Demonstrate the working decisions.

  • Readable input
  • Controlled output
  • Visible state
  • Reliable reset
  • Held-button test
  • One state bug explained