     delay(2);
   }
   if (ttl.length() > 0) {
-    if (ttl == F("[BN:1]\r\n")) { // manual on, [BN:1]
-      autoC = false;
-      on(); 
-    } else if (ttl == F("[BN:2]\r\n")) { // manual off, [BN:2]
-      autoC = false; 
-      off();
-    } else if (ttl == F("[BN:3]\r\n")) { // auto mode, [BN:3]
-      autoC = !autoC;
-    }
     if (ttl != "OK" /*|| ttl != "\r\nOK" || ttl != "\r\nOK\r\n" || ttl != "OK\r\n" || ttl != "OKOK" */) {
-      if (ttl == F("[BN:32]\r\n")) atMain = true; else atMain = false;
-      if (ttl == F("[BN:31]\r\n") || ttl == F("[BN:1]\r\n") || ttl == F("[BN:2]\r\n") || ttl == F("[BN:3]\r\n")) atCtrl = true; else atCtrl = false;
-      if (ttl == F("[BN:29]\r\n")) atCard = true; else atCard = false;
-      if (ttl == F("[BN:25]\r\n") || ttl == F("[BN:22]\r\n") || ttl == F("[BN:21]\r\n") || ttl == F("[BN:20]\r\n")
-       || ttl == F("[BN:19]\r\n") || ttl == F("[BN:18]\r\n") || ttl == F("[BN:17]\r\n") || ttl == F("[BN:16]\r\n")) { 
+      int bn = 0; 
+      sscanf(ttl.c_str(), "[BN:%d]\r\n", &bn);
+      //Serial.println(bn,DEC);
+      if (bn == 32) atMain = true; else atMain = false;
+      if (bn == 31 || bn == 1 || bn == 2 || bn == 3) {
+        atCtrl = true; 
+        if (bn == 1) {
+          autoC = false; on();
+        } else if (bn == 2) {
+          autoC = false; off();
+        } else if (bn == 3) {
+          autoC = !autoC;
+        }
+      } else atCtrl = false;
+      if (bn == 29) atCard = true; else atCard = false;
+      if (bn == 25 || bn == 22 || bn == 21 || bn == 20 || bn == 19 || bn == 18 || bn == 17 || bn == 16) { 
         atRTC = true;
         DateTime now = rtc.now();
-        int d1, d2, d3, e1, e2, e3;
-        d1 = (showTime) ? now.hour() : now.year();
-        d2 = (showTime) ? now.minute() : now.month();
-        d3 = (showTime) ? now.second() : now.day(); 
-        e1 = (!showTime) ? now.hour() : now.year();
-        e2 = (!showTime) ? now.minute() : now.month();
-        e3 = (!showTime) ? now.second() : now.day(); 
-        if (ttl == F("[BN:16]\r\n")) { // switch datetime, 16
+        DateTime adj;
+        if (bn == 16) { // switch datetime, 16
           showTime = !showTime;
         } else {
-          if (ttl == F("[BN:22]\r\n")) { // up1
-             d1++;
-          } else if (ttl == F("[BN:21]\r\n")) { // down1
-            d1--;
-          } else if (ttl == F("[BN:20]\r\n")) { // up2
-            d2++;
-          } else if (ttl == F("[BN:19]\r\n")) { // down2
-            d2--;
-          } else if (ttl == F("[BN:18]\r\n")) { // up3
-            d3++;
-          } else if (ttl == F("[BN:17]\r\n")) { // down3
-            d3--;
+          if (bn == 22) { // up1
+            if (showTime) { // hh
+              adj = DateTime(now + TimeSpan(3600));
+            } else { // YYYY
+              adj = DateTime(now + TimeSpan(365, 0, 0, 0));
+            }
+          } else if (bn == 21) { // down1
+            if (showTime) { // hh
+              adj = DateTime(now - TimeSpan(3600));
+            } else { // YYYY
+              adj = DateTime(now - TimeSpan(365, 0, 0, 0));
+            }
+          } else if (bn == 20) { // up2
+            if (showTime) { // mm
+              adj = DateTime(now + TimeSpan(60));
+            } else { // MM
+              adj = DateTime(now + TimeSpan(30, 0, 0, 0));
+            }
+          } else if (bn == 19) { // down2
+            if (showTime) { // mm
+              adj = DateTime(now - TimeSpan(60));
+            } else { // MM
+              adj = DateTime(now - TimeSpan(30, 0, 0, 0));
+            }
+          } else if (bn == 18) { // up3
+            if (showTime) { // ss
+              adj = DateTime(now + TimeSpan(1)); // +1s
+            } else { // DD
+              adj = DateTime(now + TimeSpan(1, 0, 0, 0));
+            }
+          } else if (bn == 17) { // down3
+            if (showTime) { // ss
+              adj = DateTime(now - TimeSpan(1));
+            } else { // DD
+              adj = DateTime(now - TimeSpan(1, 0, 0, 0));
+            }
           }
-          if (showTime) rtc.adjust(DateTime(e1, e2, e3, d1, d2, d3)); else rtc.adjust(DateTime(d1, d2, d3, e1, e2, e3));
+          rtc.adjust(adj);
         }
       } else {
         if (atRTC) {
-          if (ttl != F("[BN:0]\r\n")) atRTC = false;
+          if (bn != 0) atRTC = false;
         }
       }
        
-      if (ttl == F("[BN:30]\r\n")) {
+      if (bn == 30) {
         if (noAuto) {
-          Serial.println(F("RTC\xC4\xA3\xBF\xE9\xB9\xCA\xD5\xCF")); //RTC模块故障
+          Serial.println("DS12(0,0,'RTC\xC4\xA3\xBF\xE9\xB9\xCA\xD5\xCF',1);"); //DS12(0,0,'RTC模块故障',1);
         } else {
           atCount = true; countLoop = 59;
         }

    }
  }
  if (atRTC) {
    DateTime now = rtc.now();
    Serial.print(F("SBC(0);CBOF(0,32,220,65,5,0);"));
    if (showTime) {
      Serial.print(F("DS32(56,32,'"));
      if (now.hour() < 10) { Serial.print(0); Serial.print(now.hour()); } else Serial.print(now.hour()); Serial.print(F("',1,0);DS32(90,32,'/',1,0);DS32(102,32,'"));
      if (now.minute() < 10) { Serial.print(0); Serial.print(now.minute()); } else Serial.print(now.minute()); Serial.print(F("',1,0);DS32(135,32,'/',1,0);DS32(146,32,'"));
      if (now.second() < 10) { Serial.print(0); Serial.print(now.second()); } else Serial.print(now.second()); Serial.println(F("',1,0);"));
    } else {
      Serial.print(F("DS32(30,32,'")); Serial.print(now.year()); Serial.print(F("',1,0);DS32(90,32,'/',1,0);DS32(102,32,'"));
      Serial.print(now.month()); Serial.print(F("',1,0);DS32(135,32,'/',1,0);DS32(146,32,'"));
      Serial.print(now.day()); Serial.println(F("',1,0);"));
    }
  }
  if (atCard) {

  Serial.println(F("----------------------------------"));
  Serial.println(F("Serial successfully opened @ 115200"));
  pinMode(4,OUTPUT);
  digitalWrite(3, HIGH); // for emergency backup
  Serial.print(F("Configured D")); Serial.print(AUDIO_CONTROL); Serial.println(F(" for audio control."));
  delay(200);
  Serial.println(F("Initializing I2C driver ..."));
  if (!rtc.begin()) {
    Serial.println(F("[x] Couldn't find RTC module.")); noAuto = true; autoC = false;
  } else {
    if (rtc.lostPower()) {
      Serial.println(F("[!] RTC lost power. Resetting..."));
      rtc.adjust(DateTime(F(__DATE__), F(__TIME__)));
      noAuto = true; autoC = false;
    }
    DateTime now = rtc.now();
    temp = rtc.getTemperature();
