On some board (like the ESP8266-01), there is an on-board LED that is seemingly on by default. To turn it off, I've added some code to explicitly set the LED off. Some people might not be bothered by it, or may want to use that pin as an additional GPIO.
This uses the built-in define of BUILTIN_LED, which should be defined by the board configuration automatically in the Arduino IDE.
Add a configuration option for what to do with the LED.
On some board (like the ESP8266-01), there is an on-board LED that is seemingly on by default. To turn it off, I've added some code to explicitly set the LED off. Some people might not be bothered by it, or may want to use that pin as an additional GPIO.
This uses the built-in define of
BUILTIN_LED
, which should be defined by the board configuration automatically in the Arduino IDE.Add a configuration option for what to do with the LED.
-1
= Do not change its default pin mode.0
= Explicitly set it toLOW
1
= Explicitly set it toHIGH