 
 
 //----- WIFI -----
-//System default wifi setting: SSID=LASS, PASS=LASS123456, WIFI_AUTH=LWIFI_WPA
-#define WIFI_SSID "LASS"         //  REPLACE: your network SSID (name)
-#define WIFI_PASS "LASS123456"         //  REPLACE: your network password (use for WPA, or use as key for WEP)
-#define WIFI_AUTH LWIFI_WPA //LWIFI_WPA // choose from LWIFI_OPEN, LWIFI_WPA, or LWIFI_WEP.
 LWiFiClient wifiClient;
 
 //----- SENSORS -----
-#define SENSOR_CNT 20          // REPLACE: the sensors count that publish to server.
+
 char sensorType[SENSOR_CNT][3];
 float sensorValue[SENSOR_CNT];
-#define SENSOR_STRING_MAX 300
 char sensorUploadString[SENSOR_STRING_MAX]; //buffer // Please extend this if you need
 
+// The followings are used for DHT22 sensors
+float h,t;
+boolean ThreadComplete;
 
 //----- MQTT -----
-#define MQTT_PROXY_IP "gpssensor.ddns.net"  // Current LASD server
-#define DEVICE_TYPE  "LinkItONE"
-#define DEVICE_ID "YOUR_DEVICE_NAME"    // REPLACE: The device ID you like, please start from LASD. Without this prefix, maybe it will be filter out.
-#define MQTT_TOPIC_PREFIX "LASS/Test" 
-#define PARTNER_ID "LASS-Partner1"
+
 char mqttTopic[64];
 char mqttTopicSelf[64]; // The topic used for central alarm
 char mqttTopicPartner[64]; // The topic used for partner alarm

    wifiConnecting();
    wifiConnected(); 
  }

  // GPS  
  LGPS.getData(&info);
  packInfo(INFO_GPS);
  
  
  // Sensor
  get_sensor_data();
  // Self alarm
  alarm_self_handler();
  

      sensorValue[SENSOR_ID_DUST] = (float)pm25sensorG3();
      Serial.print("[SENSOR-DUST]:");
      Serial.println(sensorValue[SENSOR_ID_DUST]);


      ThreadComplete=false;
      LTask.remoteCall(createThread, NULL);
      delay(200);
      while(!ThreadComplete){
        delay(1000);
      };     
/*      float h,t;
      dht.readHT(&t, &h);
      while (isnan(t) || isnan(h) || t<0 || t>80 || h<0 || h > 100){
        Serial.println("Something wrong with DHT => retry it!");
        delay(100);
        dht.readHT(&t, &h);    
      }
*/
      sensorValue[SENSOR_ID_TEMPERATURE] = t;
      Serial.print("SensorValue(Temperature):");
      Serial.println(sensorValue[SENSOR_ID_TEMPERATURE]);
