int ledPin = 13; int butPin = 12; int twoDelay = 100; int pressed = 0; void setup() { // put your setup code here, to run once: pinMode(ledPin, OUTPUT); pinMode(butPin, INPUT); pinMode(10, OUTPUT); digitalWrite(10, HIGH); } void loop() { // put your main code here, to run repeatedly: pressed = digitalRead(butPin); if (pressed == HIGH) { digitalWrite(ledPin, HIGH); } else { digitalWrite(ledPin, LOW); } }