bbswitzer / PianoProject

Arduino Code for a DIY Player Piano
MIT License
58 stars 19 forks source link

ESP32 Compilation error #7

Closed mcvall closed 3 years ago

mcvall commented 3 years ago

Hi Brandon. I have Compilation error, how to solve a problem? Thanks.

C:\Arduino\PianoProject-master (1)\PianoProject-master\ESP32\ESP32.ino: In function 'void flashLED()': ESP32:33:15: error: 'LED_BUILTIN' was not declared in this scope digitalWrite(LED_BUILTIN, HIGH); ^ C:\Arduino\PianoProject-master (1)\PianoProject-master\ESP32\ESP32.ino: In function 'void setup()': ESP32:47:10: error: 'LED_BUILTIN' was not declared in this scope pinMode(LED_BUILTIN, OUTPUT); ^ exit status 1 'LED_BUILTIN' was not declared in this scope

jord4231 commented 3 years ago

Just define the built in led at the start of the sketch I think it's pin D9 this solved it for me.

mcvall commented 3 years ago

I use ESP32 WROOM DevKit v1, but it not have pin D9.

bbswitzer commented 3 years ago

Hi. Looks like your ESP32 doesn't have a built-in LED. Those lines aren't really necessary, so you can delete those or change LED_BUILTIN to a different pin.