About blink examples

void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(LED_BUILTIN, OUTPUT);
  
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(LED_BUILTIN, HIGH);  // turn the LED on (HIGH is the voltage level)
  delay(1000);                      // wait for a second
  digitalWrite(LED_BUILTIN, LOW);   // turn the LED off by making the voltage LOW
  delay(1000);                      // wait for a second
}

I uploaded this code to 'esp-wroom-32'
I expected the LED turns on and off forever but it wasn't really like that.
The LED turns on and off as if it was broken. For a moment only a faint light flashed.
I don't know why this happened.

My initial suspicion would be that LED_BUILTIN doesn't match the pin on whatever board you're using.

2 Likes

Hello alstmda

Welcome to the best Arduino forum ever :wink:

Take a search engine of your choice and ask the WWW for "esp-wroom-32 +LED_BUILTIN" to get some ideas.

The ESP-WROOM-32 module itself doesn't have a LED:

-- https://esp32.com/download/file.php?id=1717

Do you perhaps have a development board with both an ESP-WROOM-32 module and a LED on it? If so, which board? Some development boards only have a power LED.

1 Like

for the esp32 dev modules i get

Tst:3:11: error: 'LED_BUILTIN' was not declared in this scope
   pinMode(LED_BUILTIN, OUTPUT);

doesn't it depend on the particular board

1 Like

I have come across some clone boards that do contain an RGB LED. However, as they are very cheap knock off clones there is little evidence as to what they contain and how to access them. So this is correct:-

1 Like

@alstmda I have several ESP Wroom 32 30 pin breakout and on those modules the onboard led is pin 2

#define led 2

// 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, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(led, HIGH);  // turn the LED on (HIGH is the voltage level)
  delay(300);                      // wait for a second
  digitalWrite(led, LOW);   // turn the LED off by making the voltage LOW
  delay(300);                      // wait for a second
}

There are many different ESP32-boards

ESP32 30 pin with or without onboard LED
ESP32 38 pin with or without onboard LED
ESP32-nodeMCU with or without onboard LED
ESP32-S2
ESP32-S3
ESP32-C3
different XIAO ESP32-boards etc. etc. etc.

You should post a link to exact that ESP32-board that you have bought.

That's why I don't see a LED. I didn't expect my ESP32-WROOM-32 not to have an LED. I was testing a simple program to see if links etc. were working but no LED. Thanks

This is exactly why the post 1990’s world of ‘clones’ and lack of formal standards & documentation is killing technological development

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