 }
 
 void switchLights() {
-  // todo - change the threshold to base100
   if (lightOnThreshold > lightResistorVal && !lightIsOn) {
     digitalWrite(LightSwitch, HIGH);
     lightIsOn = true;
   } 
-  // todo - change the threshold to base100
   if (lightOnThreshold < lightResistorVal && lightIsOn) {
     digitalWrite(LightSwitch, LOW);
     lightIsOn = false;

    if (waterPumpIsOn && currentMillis >= prevWatering + wateringSeconds) {
    waterPumpIsOn = false;
    Console.println("Watering stopped");    
  // todo - change the threshold to base100
  } else if (waterPumpIsOn && moistureThreshold < moistureSensorVal) {
    waterPumpIsOn = false;
    Console.println("Watering stopped");


void outputEvent() {  
  String my_output = "";
  // strings
  my_output += "AppId:";                        my_output += appId;
  my_output += ";Location:";                    my_output += location;
  my_output += ";WaterLevelStatus:";            my_output += waterLevelStatus;
  // numerics
  my_output += ";AirTemperatureCelcius:";       my_output += am.tempAirC;
  my_output += ";AirTemperatureFahrenheit:";    my_output += am.tempAirF;
  my_output += ";HeatIndex:";                   my_output += am.heatIndex;
  my_output += ";HumidityPercent:";             my_output += am.humidityAir;
  my_output += ";LightPercent:";                my_output += lightPercent;
  my_output += ";LightValue:";                  my_output += lightResistorVal;
  my_output += ";LightIsOn:";                   my_output += lightIsOn;
  my_output += ";MoisturePercent:";             my_output += moisturePercent;
  my_output += ";MoistureValue:";               my_output += moistureSensorVal;
  my_output += ";ProbeTemperatureCelcius:";     my_output += sm.tempSoilC;  
  my_output += ";ProbeTemperatureFahrenheit:";  my_output += sm.tempSoilF;
  my_output += ";WaterLevelValue:";             my_output += waterLevelVal;
  my_output += ";WaterPumptIsOn:";              my_output += waterPumpIsOn;
  
  Console.println(my_output);
}

