Submit

08 / 16

Buzzer: Frequency, Pitch & tone()

Change a piezo buzzer frequency and compare pitches. Use tone() to connect a signal measured in hertz with the sound you hear.

Run this experiment →
Independently modeled teaching circuit with detailed connectors, pins, chip and component wiring

Why it’s here

Connect frequency with perceived pitch.

How it works

Frequency counts cycles per second. Doubling the frequency raises the pitch by one octave. Sound is opt-in and begins only after a user gesture; the displayed frequency remains useful with audio muted.

Try it

  1. Open this experiment
  2. Enable sound and run at 440 Hz. Try 880 Hz next, then return to 440 Hz and compare the pitch.

Connections

  • D8 — Piezo signal
  • GND — Buzzer return

Example sketch

void setup() {
  pinMode(8, OUTPUT);
}

void loop() {
  tone(8, 440);
}

Check your understanding

Does doubling frequency mean doubling volume?

Show the answer

No. Frequency determines the repetition rate and affects pitch. This control does not represent a volume adjustment.

Sources

Arduino Uno R3 ↗ · Language reference ↗

MAKE A THOUGHTFUL CHOICE

Your shortlist, side by side.

Pricing models are indicative. Check each official website for current plans and limits.