← Back to all lessons

Make a Buzzer Sound

Recommended before this lesson:

Blink an LED ↗

Your objective

Translations are draft and need educator review.

    Drag blocks from the toolbox into the workspace. Connect statement blocks beneath Start. Use the zoom controls to see your program.

    Loading workspace…

    Local Storage Only
    Saved on this browser only. Cloud project storage is not configured in this environment.

    Ready

    Run and observe the buzzer indicator: ON for 1 second, OFF for 1 second.

    Stop ends the current run and keeps the current device state. Reset clears the device and output, keeping blocks.

    Make a Buzzer Sound

    · 0 ms

    Virtual buzzer

    Illustrative black piezo buzzer with two metal leads

    OFF · Silent

    Sound is optional and off by default. Enable it to hear a quiet browser-generated example tone while the buzzer is ON during a run. This is not a recording or prediction of a physical buzzer.

    Teaching model: active-high buzzer output on GPIO 5. Real wiring needs board-specific drivers. App budgets: 10,000 steps/iterations, depth 32, 120 seconds total; waits 0.01–60 seconds. Exported files do not inherit these limits.

    Execution output

      Read-only code preview

      Connect one Start and all supported blocks with valid values to preview or run.

      Editor keyboard and screen reader access has not been verified. The surrounding instructions and controls are keyboard accessible. Practical alternatives: run the preloaded starter program, import/export workspace JSON, or inspect the read-only JavaScript, MicroPython, and C++ code preview.