void setup () { pinMode(LED_BUILTIN, OUTPUT); pinMode(2, INPUT_PULLUP); } void loop () { digitalWrite(LED_BUILTIN, !digitalRead(2)); }