Read the world · 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.
Connect frequency with perceived pitch.
Understand it
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.
Your experiment
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
Sketch
This sketch illustrates the hardware logic. The workbench runs its corresponding teaching model, not a C++ compiler.
void setup() {
pinMode(8, OUTPUT);
}
void loop() {
tone(8, 440);
}Quick check
Does doubling frequency mean doubling volume?
Show explanation
No. Frequency determines the repetition rate and affects pitch. This control does not represent a volume adjustment.