 unsigned long secCounter = 0; // count the seconds since start of timelapse
 unsigned long timeSlotCounter = 0; // count the timeslot since start of timelapse
 
+bool displayIsOn = true;
+
 String myIPStr = "";
 
 enum triggerModes { ON = 0, OFF = 1 };

                  ;
  if (refreshLine != "")
    retVal += "<FONT SIZE=-2>Page will refresh every " + String(currentAutorefresh) +  " seconds<BR>";
  return retVal;
}



// Create webserver on webServerPort
WiFiServer server(webServerPort);
WiFiClient client;

void setup()
{
  displaySetup();

  pinMode(triggerPin, OUTPUT); // setup GPIO as camera trigger
  trigger(OFF);
  if (startPin > -1)
    pinMode(startPin, INPUT_PULLUP); // Setup GPIO input for start signal

  setupWiFi();

  checkAndProcessAutoStart();
}
