     Serial.println();
   }
 
+
+
+
+  interrupts();
   //read from serial port
   if ( Serial.available() )
   {

unsigned char buf[16] = {0};
unsigned char len = 0;
String command;
int buttonState = 0;
int potVal = 0;
bool lightOn = LOW;
int strobeMode = 0;

int delayVals[4] = {0,100,70,30};

void loop()
{
  //read from bluetooth low energy
  if ( ble_available() )
  {


  // determine strobe mode
  if(lightOn) {
    if( !waiting ) {
      //turn LED off
      digitalWrite(LED_PIN,LOW);
      analogWrite(LED_PIN, 0);
      waiting = true;
      TimerA = millis();
    }
    else if(millis()-TimerA > delayVals[strobeMode]){
      //wait a certain amount of time
      waiting = false;
      
      //turn LED back on
      digitalWrite(LED_PIN,HIGH);
      int newBrightness = potVal/4;
      analogWrite(LED_PIN, newBrightness);
    }
  }

  delay(10);
  
  
  ble_do_events();

//  interrupts();
  
}

