       setSunSet();
     }
   } 
+  else if (digitalRead(rotaryButton)==LOW && debounceDigitalRead(rotaryButton)==LOW) {
+    updateBrightness();
+  }
+
   if (digitalRead(alarmMasterSwitch) == LOW) {
     alarmMasterSwitchEnabled = false;
     if (alarmEnabled && alarmActive) {

  pinMode(AlarmButton,INPUT_PULLUP); 
  pinMode(TimeButton,INPUT_PULLUP);
  pinMode(alarmMasterSwitch, INPUT_PULLUP);
  pinMode(RotaryButton, INPUT_PULLUP);
  pinMode(OffButton,INPUT);
  pinMode(AlarmLED, OUTPUT);
  pinMode(TimeLED, OUTPUT);

  else {
    alarmMasterSwitchEnabled = true;
  }
  updateLight();
  updateCurrentTime();
  updateClockTime();
