#define LED D0            // Led in NodeMCU at pin GPIO16 (D0).
void setup() {
pinMode(LED, OUTPUT);    // LED pin as output.
 Serial.begin(9600);
}
void loop() {
  bool LEDstatus =0;
digitalWrite(LED, HIGH);// turn the LED off.(Note that LOW is the voltage level but actually 
 LEDstatus=1;                       //the LED is on; this is because it is acive low on the ESP8266.
 Serial.println(LEDstatus);
delay(985);            // wait for 1 second.
digitalWrite(LED, LOW); // turn the LED on.
delay(15); // wait for 1 second.
LEDstatus = 0;
Serial.println(LEDstatus);
}
