#define LED_BUILTIN 2

const int buttonPin = 5;         //  (GPIO5 - D5)
const int ledPin =  LED_BUILTIN; 

// variables will change:
int buttonState = 0;         

void setup() {
  pinMode(ledPin, OUTPUT);
  pinMode(buttonPin, INPUT);
}

void loop() {
  buttonState = digitalRead(buttonPin);

  if (buttonState == HIGH) {
    digitalWrite(ledPin, HIGH);
  } else {
    digitalWrite(ledPin, LOW);
  }
}