How to listen for an incoming serial string inside loop with long delay?
void loop() {
  static unsigned long prev = 0;
  unsigned long now = millis();

  if (now - prev &gt;= 10000L) {
    serialRoutine();
    dataLoggingEvery10Second();
    prev = now;
  }
}


This will executed at time 10s, 20s, etc. I