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.
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.
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:-
@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
}
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