What it is: The TTP223 is a capacitive touch button — a solid-state replacement for a mechanical push button. Touch the pad and OUT goes HIGH. It even works through a thin sheet of plastic or glass, so you can hide it behind a panel.
How it works: The chip senses the tiny capacitance your finger adds to the pad and drives OUT HIGH while touched. Digital only. This sketch also counts how many times you tap it.
Wiring:
TTP223 OUT (I/O) -> GPIO10 (digital)
TTP223 VCC -> 3V3
TTP223 GND -> GND
OLED VCC=3V3, GND=GND, SDA=GPIO4, SCL=GPIO5
Libraries: only "Adafruit SSD1306" and "Adafruit GFX Library".
On screen / Serial: "TOUCH" while your finger is on the pad, plus a tap counter. Tap it a few times.
Gotchas: Default is active-HIGH momentary. Solder jumpers on the back switch it to toggle mode or active-LOW — leave them alone for this sketch. It recalibrates at power-on, so don't touch it during the first second. Note: the ESP32-C3 also has built-in touch pins, but this uses the external module.