//GPIO Pin definitions #define WiFiLED 13 #define TouchLED 12 //Also operates Relay coil #define TouchInput 0 void setup() { // put your setup code here, to run once: //Enable output to the serial monitor Serial.begin(115200); Serial.println(); //Setup our GPIO pins for input/output as needed pinMode(WiFiLED,OUTPUT); pinMode(TouchLED,OUTPUT); pinMode(TouchInput,INPUT); //Turn those LEDS's off :) digitalWrite(WiFiLED,HIGH); //Inverse logic levels for the WiFi LED digitalWrite(TouchLED,LOW); //Have a little breather for a second delay(1000); //Turn on our WiFi LED digitalWrite(WiFiLED,LOW); } void loop() { //Get the current button state int reading = digitalRead(TouchInput); //If the button is high, aka touched turn our LED on and //output a little message to the serial monitor if (reading == true){ digitalWrite(TouchLED,HIGH); Serial.println("Gerrooooorf, that tickles"); } delay(250); }