  */
 void loop() {
   esp.process();
-
+  // 5 second pause on initial startup to let devices settle, wifi connect, etc.
+  if (millis() > 5000) {
     // Only fetch new sensor data if it's been long enough since the last reading.
     if (lastReading == 0 ||
         ((unsigned long)(millis() - remoteLockStart) > remoteOverride &&
         (unsigned long)(millis() - lastReading) > readingInterval)) {
       // Read new data from sensors
       readSensors();
-  
+
       // Respond ot sensor data
       handleSensorReadings();
     }
-  
+
     // Move the door as needed
     doorMove();
-  
+
     // Update door LEDs as needed
     doorLEDs();
-  
+
     // Update the LCD display
     updateLCD();
-
-}
+  }
+}

OneWire ds(tempSense);
LiquidCrystal lcd(lcd_4, lcd_5, lcd_6, lcd_11, lcd_12, lcd_13, lcd_14);

ESP esp(&espPort, &debugger, chpdPin);
MQTT mqtt(&esp);
boolean wifiConnected = false;


       digitalWrite(doorClose, LOW);
       digitalWrite(doorOpen, LOW);
       digitalWrite(doorSpeed, LOW);
       doorState = "open";
       if (doorStatePrev != doorState && wifiConnected) {
         mqtt.publish("coop/status", "door|open", 2, 0);
       }
     }
   }
 }
