 #define PASS ""        // your network password            //
 //---------------------------------------------------------//
 
-#define DHTTYPE DHT22   // DHT 22  (AM2302), AM2320, AM2321
+#define DHTTYPE DHT22     // DHT 22  (AM2302), AM2320, AM2321
 const int DHTPin = 4;
+bool fahrenheit = true;
 DHT dht(DHTPin, DHTTYPE);
-bool fahrenheit = true;
+
+#define MAXCHARS  32        // Max chars before a line break
+#define ENDMARKER '\n'      // Character that defines the end of a line
+char serialChars[MAXCHARS]; // Array to store received data
+static byte next_loc = 0;   // Array location for next char
 
 unsigned long lastTempHumidSend = millis();
 #define TEMP_HUMID_UPDATE_FREQUENCY 60000
 
 // Initial set up routines
 void setup() {
-  Serial.begin(115200);
-  Serial.println();
+  Serial.begin(9600);
   dht.begin();
   connectWifi();        //Connect to wifi
   MQTT_Helper.setup();

    MQTT_Helper.publishMQTT("home/attic/controller/temp",  temp,  false);
    MQTT_Helper.publishMQTT("home/attic/controller/humid", humid, false);
    lastTempHumidSend = millis();
  }
}


float getHumidity() {
  return dht.readHumidity();
}
