node mcu LED blink issue

I have used Nodemcu from AMICA. I am facing different issue while blink. These any days code is working well without any issue. i have updated my IDE now i could not able to blink normal LED

I have simple code to blink LED . I forget about using SSID and all.
I have tested code with arduino Uno its working well, When i tested with nodemcu its now working
when i measure voltage potential it stays at 1.3v and wont change over I have different Nodemcu unit its doing same thing

If i use serial statement in between its working well. why my led is not changing state

I have used 560E resistor in Series with portpin and connected to LED to Gnd. Normal Resistor Network.
I am powering nodemcu using DC 3.3V supply.
I have also tested with USB power to blink LED. Output across Port pin and gnd remain at 1.7v

#define LED 0
void setup() {
pinMode(LED, OUTPUT);
}
void loop() {
digitalWrite(LED, HIGH);
delay(1000);
digitalWrite(LED, LOW);
delay(1000);
}

working

void setup() {
  pinMode(LED_BUILTIN, OUTPUT);     // Initialize the LED_BUILTIN pin as an output
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(LED_BUILTIN, LOW);   // Turn the LED on (Note that LOW is the voltage level
  // but actually the LED is on; this is because
  // it is active low on the ESP-01)
  delay(1000);                      // Wait for a second
  digitalWrite(LED_BUILTIN, HIGH);  // Turn the LED off by making the voltage HIGH
  delay(2000);                      // Wait for two seconds (to demonstrate the active low LED)
}

Are you using the correct pin ? "0" is not the same as "D0"

 // Turn the LED on (Note that LOW is the voltage level
  // but actually the LED is on; this is because
  // it is active low on the ESP-01)

But you were running it on a nodeMCU weren't you ? anyway same difference, the builtin LED is on GPIO2 and active 'LOW'
So to turn on a LED at GPIO 0 (D3) you will also need to make it 'Active LOW' since GPIO 0 can not be pulled "LOW' during boot (which it is when you make the LED active 'HIGH')
So connect the pin to 3.3v via a resistor and the LED (Kathode to GPIO pin)

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.