Skip to content

Commit ac503ef

Browse files
committed
adding boot-up delay define
use -D WLED_BOOTUPDELAY=500 in platformio env definition to add 500ms of delay before hardware init.
1 parent ea608ce commit ac503ef

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

wled00/wled.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,9 @@ void WLED::setup()
343343
#ifdef ARDUINO_ARCH_ESP32
344344
pinMode(hardwareRX, INPUT_PULLDOWN); delay(1); // suppress noise in case RX pin is floating (at low noise energy) - see issue #3128
345345
#endif
346+
#ifdef WLED_BOOTUPDELAY
347+
delay(WLED_BOOTUPDELAY); // delay to let voltage stabilize, helps with boot issues on some setups
348+
#endif
346349
Serial.begin(115200);
347350
#if !ARDUINO_USB_CDC_ON_BOOT
348351
Serial.setTimeout(50); // this causes troubles on new MCUs that have a "virtual" USB Serial (HWCDC)

0 commit comments

Comments
 (0)