 unsigned long previousProcess=0;
 unsigned long sendInterval=50;
 void processData(){
+  if(mode==0){
+    return;
+  }
   if((millis()-previousProcess)>sendInterval){
     float data[6];
     getData(data);

Adafruit_NeoPixel pixelsA = Adafruit_NeoPixel(ledNumA, ledPinA, NEO_GRB + NEO_KHZ800);
Adafruit_NeoPixel pixelsB = Adafruit_NeoPixel(ledNumB, ledPinB, NEO_GRB + NEO_KHZ800);
int color[]={0,250,50};
int startColor[]={0, 0, 250};
int endColor[]={0, 250, 0};
unsigned long mode1Duration=1*60*1000;


Adafruit_LSM303 lsm;

              changeMode(0);
            }
          }
          else if (notFirst){
            // register a short press
            switch (mode) {
              case 1:
