   Serial.printf("Illuminance (Brightness) : %d Lux\n", illuminance);
   Serial.printf("Water level (Millimeter) : %d mm\n\n", waterLevel);
 
-  ThingSpeak.setField(1, temperature);
-  ThingSpeak.setField(2, humidity);
+  Serial.println("Writting data to ThingSpeak......");
+  ThingSpeak.setField(1, (int)temperature);
+  ThingSpeak.setField(2, (int)humidity);
   ThingSpeak.setField(3, illuminance);
   ThingSpeak.setField(4, waterLevel);
-
-  Serial.println("Writting data to ThingSpeak......");
   ThingSpeak.writeFields(monitorChannel, monitorWrite);  
 
   Serial.println("Reading brightness control from ThingSpeak......");
   int ledBrightness = ThingSpeak.readFloatField(operationChannel, 1);
+  
   Serial.printf("Set LedBrightness to     : %d Lux\n", ledBrightness);
-   
   ledBrightness = map(ledBrightness, 0, 35000, 0, 255);
   analogWrite(LED, ledBrightness);
 

  pinMode( PH_POWER, OUTPUT );
  pinMode( WL_POWER, OUTPUT );
  pinMode( LED, OUTPUT );
  
  ThingSpeak.begin(client);
  Serial.println("\n");
}

void loop(){
  float temperature = 0, humidity = 0;
  int illuminance = 0, waterLevel = 0;

  illuminance = readBrightness(PHOTO_PIN);
  waterLevel  = readWaterLevel(WATER_LEVEL_PIN);
  temperature = dht.readTemperature(); //In celcius(°C)
  humidity    = dht.readHumidity();    //is return Relative Humidity, in percent(%)
  
  Serial.print("Temperature              : ");
  Serial.print(temperature);
  Serial.println(" celcius");

#include <SoftwareSerial.h>
#include <ESP8266WiFi.h>
#include <SimpleDHT.h>
#include "ThingSpeak.h"
#include "DHT.h"
#include "Server.h"
