 unsigned long alarmStartMillis = 0;
 const unsigned lightUpdateInterval = 50;
 unsigned long lastLightUpdate = millis();
+bool sfx_playing = false;
 void updateLight() {
   if (!isTimeNow(lastLightUpdate,lightUpdateInterval)) {
     return;
   }
-  if (digitalRead(AlarmEnabledSwitch) == LOW) return;
+  if (digitalRead(alarmMasterSwitch) == LOW) return;
   ClockTime current = current_clock_time;
   int32_t seconds = secondsBtwDates(current,startTime);
   if ((seconds < 0) || (seconds >= maxTime)) {
     if (alarmActive) {
       turnLightOff();
+      sfx.stop();
       alarmActive = false;
     }
     alarmEnabled = true;

      setSunSet();
    }
  } 
  updateBrightness();
  updateLight();
  updateCurrentTime();

  updateCurrentTime(true);
  readAlarmTimeFromEEPROM();
  updateStartTime();
  
//  turnLightOn();
//  delay(1000);
//  turnLightOff();
