 #define ALARM 3
 float sinVal;
 int toneVal;
+int alarmDuration = 0;
 
 Adafruit_NeoPixel strip = Adafruit_NeoPixel(10, LED_PIN, NEO_GRB + NEO_KHZ800);
 

    if(distance < 50) {
      triggered = true;
    }
  }
}

void alarm(){



void loop(){
  Serial.print("Alarm delay: "); Serial.println(alarmDuration);
  if(triggered == true && alarmDuration < MAX_ALARM_TIME) {
    alarmDuration += 250;
    alarm();
  } else if(triggered == true) {
    alarmDuration = 0;
    triggered = false;
    alarmOff();
  } else if (triggered == false) {
    delay(50);            // Wait 50ms between pings (about 20 pings/sec). 29ms should be the shortest delay between pings.
    unsigned int uS = sonar.ping();             // Send ping, get ping time in microseconds (uS).
    unsigned int distance = uS / US_ROUNDTRIP_CM;
