You are reading a single comment by @maze1980 and its replies. Click here to read the full conversation.
  • Just add const LED1 = D2 or const LED1 = NodeMCU.D4; //(pin2 of ESP8266) to get the build-in LED blinking.
    And actually you don't need the variables LED1 and on as you can simply call D2.toggle() or NodeMCU.D4.toggle() to toggle the pin D2/build-in LED:

    setInterval(function() {
       D2.toggle();
    }, 1000);
    

    To stop the blinking call clearInterval().

About

Avatar for maze1980 @maze1980 started