 #include <Ticker.h>
 #include <DHT.h>
 
-#define DALLAS_PIN                         2
-#define DHT_PIN                            4
-#define DHT_TYPE                       DHT22
-#define FURTILIZER_PIN                    15
-#define FURTILIZER_TIME                  1.3
-#define HEATER_PIN                        13
-#define HEATER_DELTA                     0.5 
-#define WHITE_LED_PIN                     12
-#define BLUE_LED_PIN                      14
-#define SSID                     "XXX"
-#define SSID_PASSWD   "XXX"
-#define MQTT_SERVER                 "cortex"
-#define MQTT_CLIENT                   "tank"
+#define DALLAS_PIN                            2
+#define DHT_PIN                               4
+#define DHT_TYPE                          DHT22
+#define FURTILIZER_PIN                       15
+#define FURTILIZER_TIME                     1.3
+#define HEATER_PIN                           13
+#define HEATER_DELTA                        0.0 
+#define WHITE_LED_PIN                        12
+#define BLUE_LED_PIN                         14
+#define SSID                              "XXX"
+#define SSID_PASSWD            "XXXXXXXXXXXXXX"
+#define MQTT_SERVER                    "cortex"
+#define MQTT_CLIENT                "TankClient"
+#define TEMP_CAL                          23.80
+#define TEMP_MEASURE                      22.89
+#define TEMP_DELTA    (TEMP_CAL - TEMP_MEASURE)
 
 WiFiClient                        espClient;
 PubSubClient                mqtt(espClient);

void msgString(float f){
  uint8_t h = floor(f); 
  uint8_t l = (f - h) * pow(10, 2);
  snprintf (msg, sizeof(msg), "%d.%d", h, l);  
}

void sendMessage(){  
  msgString(watertemp);
  mqtt.publish("livingroom/tank/watertemp", msg);  
  msgString(airtemp);
  mqtt.publish("livingroom/tank/airtemp", msg);  
  msgString(humidity);
  mqtt.publish("livingroom/tank/humidity", msg);      

float                         watertemp = 0;
float                           airtemp = 0;
float                          humidity = 0;
float                        settemp = 23.0;
bool                       heaterON = false;

void setup() {
