#define PIN_B1 10
#define PIN_L1 2

void setup() {
  pinMode(PIN_B1, INPUT_PULLUP);
  pinMode(PIN_L1, OUTPUT);
}

void loop() {
  if(digitalRead(PIN_B1)) {
    digitalWrite(PIN_L1, HIGH);
  } else {
    digitalWrite(PIN_L1, LOW);
  }
  delay(30);
}
$abcdeabcde151015202530fghijfghij