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 part | On 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.
Build something with it
These Build Packs use this part on this board, with the same pins.
- Desk cat with moodsA small cat whose face is drawn on a screen. Touch its head and it is happy and meows; leave it alone and it dozes off.
- Gentle alarm clockAn alarm that starts soft and slow, then grows faster and higher over a minute, so you wake up without a fright.
- Wi-Fi alert screenA desk screen that flashes a big warning sign and sounds a siren when you send it a message from your phone.
- Desk companion robotA little robot whose eyes blink and glance about. Pat its head and it is pleased; pat it three times quickly and it goes dizzy.
- Handheld meal pickerFor when nobody can decide what to eat. Scroll through a list of dishes, or press SELECT and let it choose with a spin.
- Interval timerWork, rest, repeat. Turn the knob to set the work minutes and press it to start; it beeps when each part ends.
More parts on the ESP32-S3
- ST7789 1.54 in TFT screenESP32-S3 · 7 wires
- ST7789 2.0 in TFT screenESP32-S3 · 7 wires
- GC9A01 round screenESP32-S3 · 7 wires
- SSD1306 OLED 0.96 in screenESP32-S3 · 4 wires
- SSD1306 OLED 0.91 in screenESP32-S3 · 4 wires
- 4.2 in e-paper screenESP32-S3 · 8 wires
- TTP223 touch sensorESP32-S3 · 3 wires
- Push buttonESP32-S3 · 2 wires
- Foot switchESP32-S3 · 2 wires
- Slide switchESP32-S3 · 2 wires
- SW-520D tilt switchESP32-S3 · 2 wires
- MC-38 door switchESP32-S3 · 2 wires
- AM312 PIR motion sensorESP32-S3 · 3 wires
- HC-SR04 ultrasonic sensorESP32-S3 · 4 wires
- Capacitive soil moisture sensorESP32-S3 · 3 wires
- BME280 sensorESP32-S3 · 4 wires
- MLX90614 infrared thermometerESP32-S3 · 4 wires
- SGP30 air quality sensorESP32-S3 · 4 wires
- HX711 load cellESP32-S3 · 4 wires
- KY-040 rotary encoderESP32-S3 · 5 wires
- 3×4 keypadESP32-S3 · 7 wires
- WS2812 LED ringESP32-S3 · 3 wires
- WS2812 LED stickESP32-S3 · 3 wires
- WS2812B LED stripESP32-S3 · 3 wires
- KY-016 RGB LEDESP32-S3 · 4 wires
- 2-channel relay moduleESP32-S3 · 4 wires
- 28BYJ-48 stepper motor (ULN2003)ESP32-S3 · 6 wires
- MAX98357A I2S amplifierESP32-S3 · 5 wires
- SX1262 LoRa module (Ra-01SH)ESP32-S3 · 9 wires