 AirMeasurement am;
 
 //===== For photoresistor =======================
-// todo - change the threshold to base100
+byte lightPercent;
 const byte lightOnThreshold = 90;
 const byte lightPin = A0;
 boolean lightIsOn = false;
+int lightMaxVal = 550;
+int lightMinVal = 6; 
 int lightResistorVal;
 
 //===== For hygrometer ==========================
+byte moisturePercent;
 const byte hygroPin = A1;
 // todo - find right value for this
-// todo - change the threshold to base100
 const int moistureThreshold = 1000; // <- made this up
+int moistureMaxVal = 960;
+int moistureMinVal = 50; 
 int moistureSensorVal;
 
 //===== For water level sensor ===================
 const byte waterSensorPin = A2;
 // todo - find right value for this
-// todo - change the threshold to base100
 const int waterLevelThreshold = 300; // <- made this up
 int waterLevelVal;
+int waterMaxVal = 310;
+int waterMinVal = 90; 
 String waterLevelStatus = "OK";
 
 //===== For water pump ===========================

}

void readLightResistor() {
  int val = analogRead(lightPin);
  lightResistorVal = map(val, 60, 550, 0, 100);
}

void readMoistureSensor() {
  int val = analogRead(hygroPin);
  moistureSensorVal = map(val, 110, 960, 0, 100);
}

void readWaterLevelSensor() {
  int val = analogRead(waterSensorPin);
  waterLevelVal = map(val, 90, 310, 0, 100);
  
  if (val < waterLevelThreshold) {
   waterLevelStatus = "LOW";

}

void switchLights() {
  if (lightOnThreshold > lightResistorVal && !lightIsOn) {
    digitalWrite(LightSwitch, HIGH);
    lightIsOn = true;
  } 
  if (lightOnThreshold < lightResistorVal && lightIsOn) {
    digitalWrite(LightSwitch, LOW);
    lightIsOn = false;
