     if(distance < 50) {
       triggered = true;
     }
-  }
+  } 
 }
 
 void alarm(){



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;

#define ALARM 3
float sinVal;
int toneVal;
int alarmDuration = 0;

Adafruit_NeoPixel strip = Adafruit_NeoPixel(10, LED_PIN, NEO_GRB + NEO_KHZ800);

