 const int timeSlot = 250; // timeslot in ms
 const int timeSlotsPerSecond = 1000 / timeSlot;
 
+// timeTable syntax:
+// Elements separated by comma
+// Elements can be:
+//   Delay between shots in seconds (e.g. 5)
+//   Repeat number * Delay between shots in seconds (e.g. 1000*13)
+//   _ and delay in seconds (do nothing) (e.g. _3600)
+//   ! and duration for trigger ON in seconds (e.g. !2), 0 = 250ms
+//
+// Examples:
+//   10,15,20,25,30
+//   _18000,50000*5,20000*10
+//   !5,50000*10
+String timeTable = ""; // only loadable via GET parameters, not in UI
+
 unsigned long delayToStart = default_delayToStart;
 unsigned long numberOfShots = default_numberOfShots;
 unsigned long delayBetweenShots = default_delayBetweenShots;
+unsigned long triggerDuration = default_triggerDuration;
 unsigned long autorefresh = default_autorefresh;
 unsigned long previousTimeSlotMillis = 0;
 unsigned long currentDelayToStart = 0;
 unsigned long currentNShots = 0;
-unsigned long NumberOfShotsSinceStart = 0; //
+unsigned long currentTDuration = 0;
+unsigned long NumberOfShotsSinceStart = 0;
 unsigned long currentDelayBetweenShots = 0;
+unsigned long currentTriggerDuration = 0;
 unsigned long currentAutorefresh = 0;
 int currentTimelapseAutoStart = timelapseAutoStart;
 
 unsigned long secCounter = 0; // count the seconds since start of timelapse
-unsigned long timeSlotCounter = 0; // count the timeslots since start of timelapse
+unsigned long timeSlotCounter = 0; // count the timeslots in a second
 
 int highlightLine = 2;
 int lastDialogLine = 8;

    timeSlotCounter = 0;
    currentDelayToStart = delayToStart;
    currentDelayBetweenShots = delayBetweenShots;
    NumberOfShotsSinceStart = 0;
    if (delayToStart == 0)
    {

                  "<tr><td>Delay to start:</td><td><input " + stateNotInTimelapse + " id=delayToStart name=delayToStart type=number min=0 step=1 value=" + String(sDelay) + "> sec</td></tr>"
                  "<tr><td>Number of shots:</td><td><input " + stateNotInTimelapse + " id=numberOfShots name=numberOfShots type=number min=1 step=1 value=" + String(nShots) + "></td></tr>"
                  "<tr><td>Interval:</td><td><input " + stateNotInTimelapse + " id=delayBetweenShots name=delayBetweenShots type=number min=1 step=1 value=" + String(interval) + "> sec</td></tr>"
                  "<tr><td>Trigger duration (0=250ms):</td><td><input " + stateNotInTimelapse + " id=triggerDuration name=triggerDuration type=number min=0 step=1 value=" + String(tDuration) + "> sec</td></tr>"
                  "<tr><td></td><td></td></tr>"
                  "<tr><td></td><td></td></tr>"
                  "<tr><td>" + waitForGPIOLine + ""
