 #define TEMP_POT_PIN     A0
 #define HUM_POT_PIN      A1
 #define MOIST_SENS1_PIN  A2
+#define AM_USES1         A4
+#define AM_USES2         A5
+#define LIGHTSENS_PIN    A6
 
 //digital pin assignments
-#define LCDPIN1       2
-#define LCDPIN2       3
-#define LCDPIN3       4
-#define BTNPIN        5
-#define SERVOPIN      10
-#define SSERIALTX     11  //to RX on ESP-05
-#define SSERIALRX     12  //to TX on ESP-05
-#define ESPRESETPIN   13
+#define LCDPIN1          2
+#define LCDPIN2          3
+#define LCDPIN3          4
+#define BTNPIN           5
+#define DALLAS_ONE_WIRE  6
+#define SERVOPIN         10
+#define SSERIALTX        11  //to RX on ESP-05
+#define SSERIALRX        12  //to TX on ESP-05
+#define ESPRESETPIN      13
 
 // The baud rate of the serial interface
 #define SERIAL_BAUD  9600

  sendCommand ("AT+RST", 8000);
  sendCommand ("AT+CWMODE=1", 2000 );
  sendCommand ("AT+CWJAP=\""
                WIFI_APN
                "\",\""
                WIFI_PWD
                "\"", 15000);
  sendCommand ("AT+CIFSR\r", 3000);
  sendCommand ("AT+GMR\r", 3000);
}

  lcd.clear();

  pinMode(MOIST_SENS1_PIN, INPUT);
  // Initialize the library for temperature sensors
  sensors.begin();
  delay(100);
  //read values, especially potentiometer values, incase of restart
  readValues();
  alertLevel = tempLimitPotValue;
  humLevel = humLimitPotValue;

  state = STATE_INITIAL;
}

void loop()
{
   
  lcd.setCursor(0, 0); // Set cursor to home position
  readValues();
  handleState();
