All wiring guides

Free wiring guides

Wire the passive buzzer to the ESP32-S3

Passive piezo buzzer, 12 mm. Plays notes: the sketch sets the pitch.

When buying: Passive, so it can play different notes. An active buzzer only gives one pitch.

Which pin goes where

On the partOn the ESP32-S3
+GPIO 17
-GND

Wire it with the USB cable unplugged. Follow the names printed on your own part: makers sometimes reorder the pins.

In 3D

Example sketch

// Passive piezo buzzer, 12 mm
// on the ESP32-S3-DevKitC-1 (N8R2 or N16R8)
// https://stem.manusignal.com/en/parts/passive-buzzer-esp32-s3

const int PIN_POS = 17;

const int NOTES[] = {262, 294, 330, 349, 392, 440, 494, 523};

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

void loop() {
  for (int i = 0; i < 8; i++) {
    tone(PIN_POS, NOTES[i], 200);
    delay(250);
  }
  delay(1000);
}
  • Tools > Board > ESP32S3 Dev Module, then Tools > Port and choose the board's port.

This sketch is compiled for the board before the page is published. It has not been run on real hardware by us.

What you should see

It plays a rising scale of eight notes, pauses, and repeats.

If it does not work

The buzzer only clicks.
It is an active buzzer, or its two legs are reversed.

The same part on the ESP32-C3

Build something with it

These Build Packs use this part on this board, with the same pins.

More parts on the ESP32-S3