user43826: I'm making a low energy consumption device so I'd like to turn off all the led when I'm idle.
Unfortunately the nodemcu turn on a blue led while I'm idle (during delay(ms))
Here is my code:
#define LED    16

void setup() {
  initialSetup();
  //Turn off the built-in led
  digitalWrite(LED, HIGH);
}

void loop() {
  //Here I do everything
  doStuff();
  //GO TO SLEEP
  delay(3600000);
}

The led that turn on during delay is the one near to D0 pin.
The led that I can control and so turn off (pin #16 -> D0) is near the 5v pin.
It's possible to completely turn off all led to consume less?


user20527: See this link which shows your second LED exactly (the image is for v1.0, I have v0.9 and the code below works just the same in this situation):
'Onboard LEDs? NodeMCU's got two!': 
https://lowvoltage.github.io/2017/07/09/Onboard-LEDs-NodeMCU-Got-Two
Quote:

ESP-12 LED Blink:
 void setup() {
        pinMode(2, OUTPUT);     //Initialize GPIO2 pin as an output
 }

 void loop() {
   digitalWrite(2, LOW);   // Turn the LED on by making the voltage LOW   
   delay(1000);            // Wait for a second
   digitalWrite(2, HIGH);  // Turn the LED off by making the voltage HIGH 
   delay(2000);            // Wait for two seconds
 }


Or write it like this (ie. using 'D4' rather than '2'):

ESP-12 LED Blink:
 void setup() {
        pinMode(**D4**, OUTPUT);     //Initialize GPIO2 pin as an output
 }

 void loop() {
   digitalWrite(**D4**, LOW);   // Turn the LED on by making the voltage LOW   
   delay(1000);            // Wait for a second
   digitalWrite(**D4**, HIGH);  // Turn the LED off by making the voltage HIGH 
   delay(2000);            // Wait for two seconds
 }


Regards, Geoff

43826: <p>I'm making a low energy consumption device so I'd like to turn off all the led when I'm idle.</p>

<p>Unfortunately the nodemcu turn on a blue led while I'm idle (during <code>delay(ms)</code>)</p>

<p>Here is my code:</p>

<pre><code>#define LED    16

void setup() {
  initialSetup();
  //Turn off the built-in led
  digitalWrite(LED, HIGH);
}

void loop() {
  //Here I do everything
  doStuff();
  //GO TO SLEEP
  delay(3600000);
}
</code></pre>

<p>The led that turn on during delay is the one near to D0 pin.</p>

<p>The led that I can control and so turn off (pin #16 -> D0) is near the 5v pin.</p>

<p>It's possible to completely turn off all led to consume less?</p>

<p><a href="https://i.stack.imgur.com/i7gaU.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/i7gaU.jpg" alt="enter image description here"></a></p>
 20527: <p>See this link which shows your second LED exactly (the image is for v1.0, I have v0.9 and the code below works just the same in this situation):</p>

<p>'Onboard LEDs? NodeMCU's got two!': </p>

<p><a href="https://lowvoltage.github.io/2017/07/09/Onboard-LEDs-NodeMCU-Got-Two" rel="nofollow noreferrer">https://lowvoltage.github.io/2017/07/09/Onboard-LEDs-NodeMCU-Got-Two</a></p>

<p>Quote:</p>

<blockquote>
  <p>ESP-12 LED Blink:</p>

<pre><code> void setup() {
        pinMode(2, OUTPUT);     //Initialize GPIO2 pin as an output
 }

 void loop() {
   digitalWrite(2, LOW);   // Turn the LED on by making the voltage LOW   
   delay(1000);            // Wait for a second
   digitalWrite(2, HIGH);  // Turn the LED off by making the voltage HIGH 
   delay(2000);            // Wait for two seconds
 }
</code></pre>
</blockquote>

<p>Or write it like this (ie. using 'D4' rather than '2'):</p>

<blockquote>
  <p>ESP-12 LED Blink:</p>

<pre><code> void setup() {
        pinMode(**D4**, OUTPUT);     //Initialize GPIO2 pin as an output
 }

 void loop() {
   digitalWrite(**D4**, LOW);   // Turn the LED on by making the voltage LOW   
   delay(1000);            // Wait for a second
   digitalWrite(**D4**, HIGH);  // Turn the LED off by making the voltage HIGH 
   delay(2000);            // Wait for two seconds
 }
</code></pre>
</blockquote>

<p>Regards, Geoff</p>
