diff --git a/src/main.cpp b/src/main.cpp index 3d83ebce..b4b1ee5c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -193,6 +193,9 @@ void setup() { // read (and initialize on first run) runtime settings from NVRAM loadConfig(); // includes initialize if necessary + // now that we are powered, we scan i2c bus for devices + i2c_scan(); + // initialize display #ifdef HAS_DISPLAY strcat_P(features, " OLED"); @@ -201,9 +204,6 @@ void setup() { dp_init(RTC_runmode == RUNMODE_POWERCYCLE ? true : false); #endif - // scan i2c bus for devices - i2c_scan(); - #ifdef BOARD_HAS_PSRAM assert(psramFound()); ESP_LOGI(TAG, "PSRAM found and initialized");