boolean running = false;
int LedPin = 13;
int switchPin = 5;
void setup() {
// put your setup code here, to run once:
pinMode(LedPin, OUTPUT);
pinMode(switchPin, INPUT_PULLUP);
digitalWrite(switchPin, HIGH);
}
void loop() {
// put your main code here, to run repeatedly:
if (digitalRead(switchPin)==LOW){
delay(100);
running = !running;
digitalWrite(LedPin, running);
}
}