int t = 8; void setup() { pinMode(t, INPUT); Serial.begin(9600); } void loop() { int touch = digitalRead(t); Serial.println(touch); delay(500); }