Optimize boot order: initialize display and NeoPixel first
This commit is contained in:
@@ -50,14 +50,16 @@ void setup() {
|
||||
|
||||
// Setup NeoPixel
|
||||
pinMode(PIN_NEOPIXEL, OUTPUT);
|
||||
neopixelWrite(PIN_NEOPIXEL, 0, 0, 0); // turn off initially
|
||||
neopixelWrite(PIN_NEOPIXEL, 0, 0, 32); // Turn on solid blue to show booting
|
||||
|
||||
// Initialize peripherals
|
||||
Flash_test();
|
||||
SD_Init();
|
||||
// Initialize Display and Backlight first so the screen lights up immediately
|
||||
LCD_Init();
|
||||
Set_Backlight(90);
|
||||
|
||||
// Initialize other peripherals
|
||||
Flash_test();
|
||||
SD_Init();
|
||||
|
||||
// Setup button
|
||||
pinMode(BOOT_KEY_PIN, INPUT_PULLUP);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user