       prevUpdateTimeSecond = second;
       String dateString = generateDateTimeString(now.year(), now.month(), now.day(), now.hour(), now.minute(), now.second());
       printThisOnLCDLine(dateString, 0);
+      
+      int lightValue = analogRead(LDR_PIN);
+      Serial.println("LDR");
+      Serial.println(lightValue);
+      
+      if(lightValue < LIGHT_THRESHOLD){
+        //Dark, turn on backlight
+        if(!isLcdBacklightOn){
+          lcd.backlight();
+          isLcdBacklightOn = true;
+        }
+      } else {
+        //Bright, turn off backlight
+        if(isLcdBacklightOn){
+          lcd.noBacklight();
+          isLcdBacklightOn = false;
+        }
+        
+      }
     }
 
 

      if(hour == OFF_HOUR && minute == OFF_MIN){
        currentlyOn = false;
        lcd.clear();
        longSleep();
      }
    


#define LED_13_PIN 13

#define LDR_PIN A1

#define DHTPIN A0 
#define DHTTYPE DHT22 

