All wiring guides

Free wiring guides

Wire the TTP223 touch sensor to the ESP32-C3

Touch sensor, TTP223. Feels a fingertip, even through thin plastic.

When buying: Default mode: touched reads HIGH.

Which pin goes where

On the partOn the ESP32-C3
GNDGND
I/OGPIO 3
VCC3V3

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

In 3D

Example sketch

// Touch sensor, TTP223
// on the ESP32-C3 Super Mini
// https://stem.manusignal.com/en/parts/ttp223-touch-sensor-esp32-c3

const int PIN_IO = 3;

int last = -1;

void setup() {
  Serial.begin(115200);
  pinMode(PIN_IO, INPUT);
}

void loop() {
  int now = digitalRead(PIN_IO);
  if (now != last) {
    last = now;
    Serial.println(now == HIGH ? "ON" : "off");
  }
  delay(20);
}
  • Tools > Board > ESP32C3 Dev Module (USB CDC On Boot: Enabled), 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

Open the Serial Monitor at 115200. It prints ON when you touch the pad and off when you let go.

If it does not work

Touch is not felt through the case.
Press the sensor flat against the inside of the wall. It works through about 2 mm of plastic, not more.

The same part on the ESP32-S3

Build something with it

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

More parts on the ESP32-C3