 }
 
 
-void sendData(float temp,float soil_hum) {  
+void sendData(float temp, float soil_hum) {  
    WiFiClient client;
   
-   if (client.connect(server, 80)) { // use ip 184.106.153.149 or api.thingspeak.com
+   if (client.connect(SERVER, 80)) { // use ip 184.106.153.149 or api.thingspeak.com
        Serial.println("WiFi Client connected ");
        
-       String postStr = apiKey;
+       String postStr = API_KEY;
        postStr += "&field1=0&field2=";
        postStr += String(temp);
        postStr += "&field3=";

       client.print("POST /update HTTP/1.1\n");
       client.print("Host: api.thingspeak.com\n");
       client.print("Connection: close\n");
       client.print("X-THINGSPEAKAPIKEY: " + apiKey + "\n");
       client.print("Content-Type: application/x-www-form-urlencoded\n");
       client.print("Content-Length: ");
       client.print(postStr.length());

  int j = 0;

  for(i=0;i<n;i++){
    ValBuf[i] = analogRead(PIN_SOIL);
    Serial.println(ValBuf[i]);
  }

  for(i=0;i<n-1;i++){
