SunFounder ESP32 Starter Kit
will conduct, so that the buzzer will sound.
The role of S8050 (NPN transistor) is to amplify the current and make the buzzer sound louder. In fact, you can also
connect the buzzer directly to IO14, but you will find that the buzzer sound is smaller.
Wiring
Two types of buzzers are included in the kit. We need to use active buzzer. Turn them around, the sealed back (not the
exposed PCB) is the one we want.
The buzzer needs to use a transistor when working, here we use S8050 (NPN Transistor).
Code
Note:
3.15. 3.2 Custom Tone 341