   {
     // The modem is reporting a time from the 2000s, which means
     // it's not the right time
+#if !DEBUG
+    LOG_SERIAL_PORT.begin(9600);
+#endif
     
     // Try to set it from the network
     if (!modem.setTimeFromNetwork(1*60*1000UL))
     {
-#if DEBUG
       LOG_SERIAL_PORT.println("Didn't get the time signal from the network");
       // Give the user a window to set it via the serial monitor
       LOG_SERIAL_PORT.println("Enter the time (in seconds since Jan 1 1970):");

    digitalWrite(kActivityDetectedLED, HIGH);
    // Find out how long we've been active, and use that to guide
    // how many people we think have passed
    movementCount++;
    if (millis()-movementStart < 10*60*1000UL)
    {
      movementCount += (millis()-movementStart)/kPassingTime;
    }
    else
    {
      // it's over 10 minutes, reckon it's someone loitering
      // Probably at least two people then :-)
      movementCount++;
    }    
  }
}

        // We've been given a time, so let's use it
        modem.setTime(timeToString(now()));
      }
    }
  }
  // Set the Time library time from the modem
  String modemTime = modem.getTime();
  LOG_SERIAL_PORT.print("The time is ");
  LOG_SERIAL_PORT.println(modemTime);
  setTimeFromModem(modemTime);
  LOG_SERIAL_PORT.print("The internal time is ");
  LOG_SERIAL_PORT.println(now());
#if !DEBUG
  LOG_SERIAL_PORT.end();
#endif
}

String timeToString(time_t aTime)
