-
-
Notifications
You must be signed in to change notification settings - Fork 280
AudioTools.h incorrectly defines LED_BUILTIN #680
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This definition is only used when LED_BUILTIN is not defined! |
This is because pins_arduino.h does NOT define the symbol LED_BUILTIN but, instead allocates an int for it:
Therefore, in AudioConfig.h, the test:
|
Oh good, why would anybody do something like this and define LED_BUILTIN as const! |
Thanks for making that change. As for why, for most boards supported by Platformio, it appears that it is defined thus: `heltec_wifi_kit_32_v3/pins_arduino.h:static const uint8_t LED_BUILTIN = 35; heltec_wifi_kit_32_v3/pins_arduino.h:#define BUILTIN_LED LED_BUILTIN // backward compatibility heltec_wifi_kit_32_v3/pins_arduino.h:#define LED_BUILTIN LED_BUILTIN` ...which works with your code. There are some boards, though, that omit that second define, which doesn't play well with your code. BTW, AudioTools is great! I'm using it to develop a theater prop "amulet" that has lights and sound, for a local community theater production of "Peter and the Starcatcher". |
Oh, cool...when you're done you can maybe share your project in show and tell |
In AudioTools.h, the symbol LED_BUILTIN is defined in lines 220-223 and 282-285. This causes an issue when compiling for the board "lolin_s2_mini" using platformIO.
Is it really appropriate for AudioTools.h to even be defining that symbol? Should not it rely on the default definition provided in pins_arduino.h?
Thanks,
Len
The text was updated successfully, but these errors were encountered: