 
 void measure(){
   waterOK = digitalRead(WATER_LEVEL_PIN);
-  
   dallas.requestTemperatures();
   
   float t = 0;

#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.0 
#define WHITE_LED_PIN                        12
#define BLUE_LED_PIN                         14
#define WATER_LEVEL_PIN                       5
#define SSID                        "XXX"
#define SSID_PASSWD      "XXX"
#define MQTT_SERVER                    "cortex"
#define MQTT_CLIENT                "TankClient"
#define TEMP_CAL                          23.00


void setup() {
  Serial.begin(115200);
  analogWriteFreq(100);
  pinMode(     LED_BUILTIN,     OUTPUT   );
  digitalWrite(LED_BUILTIN,     FALSE    );
  pinMode(     FURTILIZER_PIN,  OUTPUT   );
  digitalWrite(FURTILIZER_PIN,  TRUE     );
  pinMode(     HEATER_PIN,      OUTPUT   );
  digitalWrite(HEATER_PIN,      FALSE    );
  analogWrite( WHITE_LED_PIN,   PWMRANGE );
  analogWrite( BLUE_LED_PIN,    PWMRANGE );
  pinMode(     WATER_LEVEL_PIN, INPUT    );
  setup_wifi();
  delay(100);
  mqtt.setServer(MQTT_SERVER, 1883);
