Led_builtin always ON

Hello there,

Just playin around with the new ESP32 nano. So far, so good… one question though, is the orange LED_BUILTIN, supposed to be always ON(lit up)??

I have very minimal code at the moment, no wiring at all other than power through USB-c and have not made any functions or calls related to d13, LED_BUILTIN…

Thanks :+1:t3:

hi @aubrey4485

it is definitely not supposed to be always on.
if you place your board with the USB connector on top, you should see the power LED (Green) on the right of the connector and that's always on when the board is on.
On the left you have the orange one and out of the factory it should be blinking.

Can you try and hold the Reset button?
When that is pressed, the orange LED should be off.
At release it should be off for at least a moment before your code starts running.

If it stays on then it's an electrical problem.

Also try the Blink example just to make sure.
If it won't blink then you should contact sales and get a replacement.
Where did you purchase your board?

Remove from breadboard (if inserted).
Check for solder bridges between pins, or pins touching.

1 Like

@ubidefeo
OK, so quick update here.

  • Holding Reset button, orange LED never goes OFF. Green power LED never goes OFF.

  • At release of Reset button, orange LED stays ON, Green power LED stays ON, RGB LED flashes cool little upload flash.

  • Tried Blink example. It works and the orange LED_BUILTIN flashes every 1 second ON and OFF

  • Tried uploading ReadAnalogVoltage example, orange LED_BUILTIN stays ON all time

  • Tried uploading basic Arduino_IoT_Cloud sketch provided through web editor, orange LED_BUILTIN stays ON all the time

I am in Canada and so I purchased this from Arduino, through Amazon.ca as this route is cheaper than going through Arduino USA or the authorized Arduino distributor in Canada, PiShop.ca.

@xfpd When I get home, I will look into this,... never thought about that. Thanks. EDIT: Actually, there is no short as I can turn it off and on.

QUICK EDIT : i forgot to mention. When uploading, If I code In setup, the LED_BUILTIN to LOW, it will turn off. I just find this weird. No?

This is expected.

Yes of course you are right... this is definitely expected. I guess I should have been more clear.

What I find weird is that no matter the sketch I upload, I will always have to code into the setup, pulling the LED_BUILTIN, LOW in order for it to stay OFF while my sketch runs.

I am only speculating but maybe...

  • use your camera at high magnification and a light to look at and around the main MCU for conductive debris or wire gaps.
  • inside the mcu atmega328p(oops), a logic path is not burned completely
  • the LED_BUILTIN path is floating (no path to ground)
2 Likes

Did you mean esp32?

Do Esp32 nanos flash there L led on upload?
Maybe something with boot loader?

2 Likes

All good suggestions… at this point, where I am from, winter is coming fast and this is for a hot tub controller, all else seems to be working fine :crossed_fingers:t2:. Hopefully it doesnt fail me in the middle of winter :grimacing:

I am just hoping Arduino is taking note, i can offer up the serial #, maybe this batch is bad? Maybe Arduino can help me solve this for possible future occurrences??

Its really not a big deal should just really be noted… being a new product and all

Hello @aubrey4485! This is indeed a curious issue, that AFAIK hasn't happened to anyone else. What core and version are you using? What is the "Pin Numbering" option set to in Tools?

If you have never done this before, maybe you could try restoring the Arduino bootloader (this completely erases the Flash and restores a known image).

1 Like

I have never restored an Arduino bootloader :grimacing:
Sounds scary and beyond me, do not feel like bricking this thing.

Ill get back to you later tonight with the pinout, versions but I believe the IDE is latest (stable) and esp32 arduino core is latest…

Thanks

  • Arduino IDE 2.2.1
  • Arduino ESP32 Boards ver. 2.0.13
  • Using MacBook Air(2014), macOS Big Sur 11.07.10
  • Pin numbering set to Arduino (default)

Perfect, thanks for confirming. :+1:

Fear not your powers! :mage: :joy:
It's actually the way to un-brick a Nano ESP32, if for whatever reason the software goes bonkers, and restore it to the latest versions we supply. This procedure is hardware based, so it can't be "deleted", and can be repeated easily. Try it!

1 Like

Will do! I did not realize you provided a link. Ill try this weekend and report back :+1:t3:

Thanks

1 Like

Hey all,

Just checking in weeks later to mark this thread as solved for closure and future reference.

The LED_Builtin no longer stays ON indefinitely… i do not really know what solved it? LOL

I have been doing many updates and changes with this Nano to get a hottub up and running before the cold grips us up here in Canada. Its been frantic! LOL :joy:

  • i did “restore” the bootloader as @lburelli linked and suggested.
  • i am using Blynk for wifi control/GUI and realized the library was using some pins (using GPIO - legacy numbering) for troubleshooting/indicators/resets and have since modified the library to avoid conflicts .

I guess its important to fully check code when using libraries, especially libraries written for esp32 dev boards.

So who knows what the fix ended up being but thanks all for the help. Sorry the answer isn’t 100% clear.

1 Like

I haven't done any research, but I suspect the default for that LED is for it to on. While ;you would think HIGH would be on, it isn't. LOW is on and HIGH is off. It works the same way for the 3 pins on the RGB LED. If I set the 3 pins on the RGB LED to HIGH, it turns off the RGB LED, if I set the 3 pins to LOW the RGB LED is White. a mix of HIGH and LOW on the 3 pins will give me 7 different colors. So while conterintuative, your board is working right. the BuiltinLED defaults to LOW (0x0) and as such will Power the LED. If you set it to HIGH (0x1), it will turn the LED off.

Here is a modified blink code that I made that cycles through all the color combinations.

int vDelay = 500;  //Controls blink speed of built in and RGB leds

void setup() {
  // put your setup code here, to run once:
  pinMode(LED_RED, OUTPUT);
  pinMode(LED_GREEN, OUTPUT);
  pinMode(LED_BLUE, OUTPUT);
  pinMode(LED_BUILTIN, OUTPUT);
}

void toggleLED() {
  if (digitalRead(LED_BUILTIN) == LOW){
    digitalWrite(LED_BUILTIN, HIGH);
  }
  else
  {
   digitalWrite(LED_BUILTIN, LOW);
  }
}

void loop() {
  //1
  toggleLED();
  digitalWrite(LED_RED, LOW);
  digitalWrite(LED_GREEN, LOW);
  digitalWrite(LED_BLUE, LOW);

  delay(vDelay);
//2
 toggleLED();
  digitalWrite(LED_RED, LOW);
  digitalWrite(LED_GREEN, LOW);
  digitalWrite(LED_BLUE, HIGH);

  delay(vDelay);
  //3
  toggleLED();
  digitalWrite(LED_RED, LOW);
  digitalWrite(LED_GREEN, HIGH);
  digitalWrite(LED_BLUE, LOW);

  delay(vDelay);
  //4
 toggleLED();
  digitalWrite(LED_RED, HIGH);
  digitalWrite(LED_GREEN, LOW);
  digitalWrite(LED_BLUE, LOW);

  delay(vDelay);
  //5
  toggleLED();
  digitalWrite(LED_RED, HIGH);
  digitalWrite(LED_GREEN, HIGH);
  digitalWrite(LED_BLUE, LOW);

  delay(vDelay);
  //6
 toggleLED();
  digitalWrite(LED_RED, HIGH);
  digitalWrite(LED_GREEN, LOW);
  digitalWrite(LED_BLUE, HIGH);

   delay(vDelay);
   //7
  toggleLED();
  digitalWrite(LED_RED, LOW);
  digitalWrite(LED_GREEN, HIGH);
  digitalWrite(LED_BLUE, HIGH);

  delay(vDelay);
  //8  Turns RGB LED completely Off
  /*
 toggleLED();
  digitalWrite(LED_RED, HIGH);
  digitalWrite(LED_GREEN, HIGH);
  digitalWrite(LED_BLUE, HIGH);
  
  delay(vDelay);
 */
}