 
 #include <DHT.h>
 
-#define DHTPIN 3 // DHT Temp & Humidity Pin
 #define DHTTYPE DHT22   // DHT 22  (AM2302)
 
-int ac_probe = 0;
-int dc_probe = 1;
+const int dht_pin = 3; // DHT Temp & Humidity Pin
+const int ac_probe = 0;
+const int dc_probe = 1;
+const int fan_pin = 4;
+const int ds18_01_pin = 2;
 
-int led_pin = 13;
+const int num_ds18 = 3; // Number of DS18B20 Sensors
+
 int led_value = LOW;
 
-int fan_pin = 4;
-
-int ds18_01_pin = 2;
-const int num_ds18 = 3; // Number of DS18B20 Sensors
 uint8_t sensors_address[num_ds18][8]; //here will store the sensors addresses for later use
 
 // Temperature chip I/O

float get_ds18b20_temp (uint8_t *address);

// Setup DHT22
DHT dht(DHTPIN, DHTTYPE);

void setup() {
  Serial.begin(9600);
  Serial.flush();

  pinMode(led_pin, OUTPUT);
  pinMode(ds18_01_pin, OUTPUT);
  pinMode(fan_pin, OUTPUT);


  }
}

void read_fan_status() {
  int fan_status = digitalRead(fan_pin);

  Serial.print("\"fan\":"); Serial.print(fan_status); Serial.print(',');
}
