Page 1 of 1

ESP32 BUILTIN LED just flickering

Posted: Sun Aug 26, 2018 1:38 pm
by Gaz0rp
Hi,

I opened the default example Blink.ino in Arduino IDE,
just added LED_BUILTIN and those Serial.* to see something happening in the console,
but the ESP32 LED just flickers everytime it is set to HIGH or LOW.
(Serial output is working)

I don't get the LED to stay ON...

Code: Select all

#define LED_BUILTIN 1

// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(LED_BUILTIN, OUTPUT);
  Serial.begin(115200);
}

// the loop function runs over and over again forever
void loop() {
  Serial.printf("LED %d: HIGH\n", LED_BUILTIN);
  digitalWrite(LED_BUILTIN, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);                       // wait for a second
  Serial.printf("LED %d: LOW\n", LED_BUILTIN);
  digitalWrite(LED_BUILTIN, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);                       // wait for a second
}
(It's a ESP-WROOM-32 if that matters)

Re: ESP32 BUILTIN LED just flickering

Posted: Mon Aug 27, 2018 2:57 am
by ESP_Sprite
Moving this to the Arduino subforum.

From what I can tell, GPIO1 is the TX pin of your serial port; could it be that your digitalWrite does nothing and the printf actually lights the LED? Can you use a different GPIO?

Re: ESP32 BUILTIN LED just flickering

Posted: Mon Aug 27, 2018 5:23 pm
by Gaz0rp
ESP_Sprite wrote:Moving this to the Arduino subforum.

From what I can tell, GPIO1 is the TX pin of your serial port; could it be that your digitalWrite does nothing and the printf actually lights the LED? Can you use a different GPIO?
Oh indeed, when i just leave the digitalWrite and no Serial.* it does work as intended!
When i just have the Serial.* it does flicker like before...

So i just can't use the internal LED if i use Serial.*
Or is there a trick to use both? Like disabling the tx function?

Re: ESP32 BUILTIN LED just flickering

Posted: Wed Jun 26, 2024 3:40 am
by Newbitcat
Hey there. I had an issue with ESP32 and TelegramBot of the LED (BuiltIn LED - PIN 2) just flickering and flashing randomly. Wanted to pull my hair out! BUT.... What I found, I bought a Wroom off Aliexpress and had it in Arduino as the Wroom (One of the three). When I changed it to ESPY Wroom, (And had to re-change the baud rate because it automatically changes every time you change a board) - It worked perfect - No more flashes. Very happy. Hope this helps.