 int8_t threshold;
 const int MPU=0x68;  // I2C address of the MPU-6050
 int16_t AcX,AcY,AcZ,Tmp,GyX,GyY,GyZ;
+int16_t accel_X_reading = 0; //lpf of AcX
 bool indexRelax, middleRelax, ringRelax;
+enum state {idle,forward_drive, backup, left_turn,right_turn};
+uint8_t turning_speed; //in forward drive and backup mode, turning_speed is set to 0
+                       //in turning state, turning speed is a function of accel reading
 
 void ISR_interrupt(){
   /*upon an interrupt, send catapult throw command*/

  AcX=Wire.read()<<8|Wire.read();  // 0x3B (ACCEL_XOUT_H) & 0x3C (ACCEL_XOUT_L)     
  AcY=Wire.read()<<8|Wire.read();  // 0x3D (ACCEL_YOUT_H) & 0x3E (ACCEL_YOUT_L)
  AcZ=Wire.read()<<8|Wire.read();  // 0x3F (ACCEL_ZOUT_H) & 0x40 (ACCEL_ZOUT_L)
  int indexFingerReading = analogRead(A0);
  indexRelax = relax(indexFingerReading);
  int middleFingerReading = analogRead(A1);

  digitalWrite(13,HIGH);
}
void setup(){
  state gestureState = idle;
  Wire.begin();
  mpu.initialize();
  mpu.dmpInitialize();
