 #define DEVICE_NAME "water_mote_01"
 #define MAC_ADDR { 0x90, 0xA2, 0xDA, 0x00, 0x4B, 0x2A }
 #define MQTT_SERVER "mqtt.autohome.brule.net"
-#define MQTT_USERID "XXXXXX"
-#define MQTT_PASSWD "XXXXXX"
+#define MQTT_USERID "pi"
+#define MQTT_PASSWD "J8n@ut0!7"
+#define WATER_PIN 8
 
 byte macAddr[] = MAC_ADDR;
 MQTT mqtt(DEVICE_NAME, macAddr, MQTT_SERVER, MQTT_USERID, MQTT_PASSWD);
 
 DHTSensor dhts(DHT_PIN);
-int doorState = digitalRead(DOOR_PIN);
+int doorState;
+
+
 
 boolean startup = true;
 

  last_interrupt_time = interrupt_time;
}


  Serial.begin(115200);
  mqtt.setup();
  dhts.setup();
  
  pinMode(DOOR_PIN, INPUT_PULLUP);
  doorState = digitalRead(DOOR_PIN);
  attachInterrupt(digitalPinToInterrupt(DOOR_PIN), doorOpen, CHANGE);

  pinMode(WATER_PIN, INPUT);
  
  delay(1000);
  startup = false;
}
