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



void loop(){
  if(triggered == true) {
    alarm();
  }
  else{
    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;

  }
}

void alarmOff() {
  color(0, 0, 0);
  NewTone(ALARM, 0);
}

//helper function enabling us to send a colour in one command
void color (unsigned char red, unsigned char green, unsigned char blue)     // the color generating function
{
