 {
   uint16_t stepNumber = (totalDimmerSteps*milliseconds)/millisecondsIn30Minutes;
   linearBrightOfStep(stepNumber);
+}
+
+void logisticBrightOfStep(uint16_t step)
+{
+  float p = ((float)step)/((float)totalDimmerSteps);
+  float L = 1.0;
+  float k = 20.0;
+  float x0 = 0.5;
+  float logisticP = L/(1+exp(-k*(p-x0)));
+  uint16_t logisticStep = logisticP*totalDimmerSteps;
+  linearBrightOfStep(logisticStep);
+}
+
+void logisticBrightOfMilliseconds(unsigned long milliseconds)
+{
+  uint16_t stepNumber = (totalDimmerSteps*milliseconds)/millisecondsIn30Minutes;
+  logisticBrightOfStep(stepNumber);
 }
 
 void turnLightOn() {

}

unsigned long alarmStartMillis = 0;
const unsigned lightUpdateInterval = 200;
unsigned long lastLightUpdate = millis();
void updateLight() {
  if (!isTimeNow(lastLightUpdate,lightUpdateInterval)) {
    return;
  }
  ClockTime current = current_clock_time;
  int32_t seconds = secondsBtwDates(current,startTime);
  if ((seconds < 0) || (seconds >= maxTime)) {

  //pinMode(LEDpinA,OUTPUT); digitalWrite(LEDpinA,0);
  pinMode(AlarmButton,INPUT_PULLUP); 
  pinMode(TimeButton,INPUT_PULLUP);
  pinMode(AlarmEnabledSwitch, INPUT_PULLUP);
  pinMode(OffButton,INPUT);
  pinMode(AlarmLED, OUTPUT);
  pinMode(TimeLED, OUTPUT);
