Audio
Microphones, speakers, I2S and amplifiers. Sound in, sound out, and the DAC in between.

I2S Amplifier
An NS4168 I2S amplifier on a TinkerBlock board: the ESP32-S3 sends sound as numbers on three wires and the chip drives a 4 Ω speaker, about 1 W on 3.3 V. CTRL must be driven HIGH or it stays off, the L/R jumper picks which channel the mono chip plays, and neither speaker wire is ground.

I2S DAC
TI's PCM5102A stereo DAC and a 3.5 mm jack on a TinkerBlock board, for the ESP32-S3, which has no DAC of its own. Three wires carry the samples in and the chip makes its own master clock from the bit clock. The output is line level, 2.1 V RMS: headphones and powered speakers, never a bare speaker. 3.3 V only, and XSMT is already held HIGH.

PDM Microphone
A LinkMems LMD2718T261-OA1 MEMS microphone on a TinkerBlock board that sends sound as one bit per clock pulse. It needs a board with a PDM input, such as the ESP32-S3's I2S0, and 3.3 V. Two signal wires, CLK in and DATA out; ordinary speech reads a few tens out of 32767, so sketches subtract an offset and apply gain.

17. Passive Buzzer
Learn tone() and noTone(); outcome: buzzer plays Do, Re, Mi in sequence then stops; can be extended to simple melodies.

18. Active Buzzer
Learn to control the active buzzer with digitalWrite() and const; outcome: buzzer on 0.5 s, off 0.5 s, repeat.

Active Buzzer
A 12 mm electromagnetic buzzer with its own oscillator, on a TinkerBlock board. SIGNAL HIGH beeps at about 2.4 kHz, LOW stops it: one note, one line of code. An S8050 transistor switches it from VCC, so your pin gives a few milliamps and VCC can be 5V beside a 3.3 V board. There is no pull-down on SIGNAL, so use a pin that stays LOW while your board boots.

Analog Microphone
An electret capsule and a one-transistor amplifier on a TinkerBlock board. SIGNAL rests at a level set by the transistor's gain and swings above and below it with sound, in a band of roughly 75 Hz to 1 kHz. Read the peak-to-peak over 50 ms: it hears claps, knocks and loud voices, and it is not a recording microphone.

Passive Buzzer
A magnetic buzzer with no oscillator of its own, switched by a transistor on a TinkerBlock board. It sounds only while SIGNAL is a square wave, at the wave's frequency, so tone() plays any note; it is loudest at its 2.7 kHz resonance. Held HIGH it is silent and the coil draws about 200 mA.