   g_step = 1;
 }
 
+void press_btn(int pin) {
+    pinMode(pin, OUTPUT);
+    digitalWrite(pin, LOW);
+    delay(SIM_BTN_DELAY);
+    pinMode(pin, INPUT);
+}
+
 void handle_msg() {
   StaticJsonBuffer<256> jsonBuffer;
 

  Serial.println((const char *)root["cmd"]);

  if (strcmp(root["cmd"], "on_off") == 0) {
    digitalWrite(PIN_ON_OFF, LOW);
    delay(SIM_BTN_DELAY);
    digitalWrite(PIN_ON_OFF, HIGH);
  } else if (strcmp(root["cmd"], "mode") == 0) {
    digitalWrite(PIN_MODE, LOW);
    delay(SIM_BTN_DELAY);
    digitalWrite(PIN_MODE, HIGH);
  } else if (strcmp(root["cmd"], "fan") == 0) {
    digitalWrite(PIN_FAN, LOW);
    delay(SIM_BTN_DELAY);
    digitalWrite(PIN_FAN, HIGH);
  } else if (strcmp(root["cmd"], "inc") == 0) {
    digitalWrite(PIN_INC, LOW);
    delay(SIM_BTN_DELAY);
    digitalWrite(PIN_INC, HIGH);
  } else if (strcmp(root["cmd"], "dec") == 0) {
    digitalWrite(PIN_DEC, LOW);
    delay(SIM_BTN_DELAY);
    digitalWrite(PIN_DEC, HIGH);
  } else if (strcmp(root["cmd"], "get") == 0) {
    g_need_report = 1;
  }

  int f = 1;
  int t = 64;
  uint8_t z = 0; /* 过滤掉全 0 的无效数据 */

  /* g_on_off */
  if (digitalRead(PIN_ON_OFF_READ) == 0) { /* on */
    i = 1;
  } else { /* off */
    i = 2;
  }
  if (g_on_off != i) {
    g_on_off = i;
    g_need_report = 1;
  }

  while (t--) {
    /* 读 COM */
