int touch_pin=A7; int Reading=0; int led=10; void setup() { // put your setup code here, to run once: pinMode(touch_pin,INPUT); Serial.begin(115200); analogReadResolution(12); analogWriteResolution(10); } void loop() { // put your main code here, to run repeatedly: Reading = analogRead(touch_pin); Serial.print("Touch_Value:"); Serial.println(Reading); delay(500); if (Reading==0) digitalWrite(led, HIGH); else digitalWrite(led, LOW); delay(100); }