@@ -1874,6 +1874,22 @@ void Wippersnapper::connect() {
18741874 _status = WS_IDLE;
18751875 WS._boardStatus = WS_BOARD_DEF_IDLE;
18761876
1877+ // Initialize components and buses
1878+ WS_DEBUG_PRINTLN (" Initializing component instances..." );
1879+ #ifdef ARDUINO_ARCH_ESP32
1880+ WS_DEBUG_PRINT (" LEDC: " );
1881+ WS._ledc = new ws_ledc ();
1882+ WS_DEBUG_PRINTLN (" OK!" );
1883+ #endif
1884+
1885+ WS_DEBUG_PRINT (" SERVO: " );
1886+ WS._servoComponent = new ws_servo ();
1887+ WS_DEBUG_PRINTLN (" OK!" );
1888+
1889+ WS_DEBUG_PRINT (" DS18x20: " );
1890+ WS._ds18x20Component = new ws_ds18x20 ();
1891+ WS_DEBUG_PRINTLN (" OK!" );
1892+
18771893 if (!validateAppCreds ())
18781894 haltError (" Unable to validate application credentials." );
18791895
@@ -1915,22 +1931,6 @@ void Wippersnapper::connect() {
19151931 publishPinConfigComplete ();
19161932 WS_DEBUG_PRINTLN (" Hardware configured successfully!" );
19171933
1918- // Register components
1919- WS_DEBUG_PRINTLN (" Initializing component instances..." );
1920- #ifdef ARDUINO_ARCH_ESP32
1921- WS_DEBUG_PRINT (" LEDC: " );
1922- WS._ledc = new ws_ledc ();
1923- WS_DEBUG_PRINTLN (" OK!" );
1924- #endif
1925-
1926- WS_DEBUG_PRINT (" SERVO: " );
1927- WS._servoComponent = new ws_servo ();
1928- WS_DEBUG_PRINTLN (" OK!" );
1929-
1930- WS_DEBUG_PRINT (" DS18x20: " );
1931- WS._ds18x20Component = new ws_ds18x20 ();
1932- WS_DEBUG_PRINTLN (" OK!" );
1933-
19341934 // goto application
19351935 statusLEDFade (GREEN, 3 );
19361936 WS_DEBUG_PRINTLN (
0 commit comments