Compilation error: 'BUILTIN_LED' was not declared in this scope

Hi Good Morning Guys.
I'm doing Project ESP32 WROOM-DA MODULE
but when I compile my Coding is showing this.
Its mean my BUILTIN_LED didn't detected.
So anyone got idea to resolve this problem?

Remove that reference and use a controller pin number.

OK I will try now

If i recall, the predefined macro is LED_BUILTIN

Compilation error: 'LED_BUILTIN' was not declared in this scope
Still same mate

another idea mate?

Did you change all references ?

Funny, I had the same experience yesterday with ESP32 dev module. No LED_BUILTIN available. I ended up using "2". If it was a longer program, I would have defined it myself at the top of the file.

The board you picked, though, isn't a board at all. So it has no LED. This could help explain the lack in your case. :slight_smile:

What board do you actually have?

2 Likes

So basically it was solved in post #2

Yes partially, but without the full context and explanation. The complete solution would be to choose the right board selection in the IDE. That hasn't been done yet, unless the OP is actually using a bare module. But then why would they ask about a LED?

WROOM module is a daughter board with castellated pads and a metal can. No more.

Sorry I meant to say if it is the ESP32 DA then the correct course of action is to assign a controller pin because the DA has no built in LED, if the OP is not using the DA then I agree it could be another problem

So often the biggest problem is that the OP doesn't post enough information. When we try to change that, OP often get testy.

Assumed user was using a:

image


This is my Board

Name is on the back.

That's the Devkit V1 isn't it, is it marked underneath, I use DOIT ESP32 Devkit 1 in the Arduino board manager

Some kind of devkit clone I think

Unless my board list is outdated, there is a generic Dev board near the top of the list.. sometimes I use that too for my Devkit V1

At least, with my latest project, it didn't cause any sweat. I looked up the pin number online. Of course it's better to use LED_BUILTIN.


so this is what i pick the board in my ide
its any wrong i want to change?

The Blink example I have uses

LED_BUILTIN

What about yours?

1 Like