//INPUT_PULLUP by default is HIGH.
//On grounding the pin, the value changes to low
//by default returning to HIGH on release
void setup() {
// put your setup code here, to run once:
pinMode(2, OUTPUT);
pinMode(13, INPUT_PULLUP);
}
void loop() {
// put your main code here, to run repeatedly:
digitalWrite(2, !digitalRead(13));
}