 double sp_Kp = 5;
 double sp_Kd = 0.5;
 double sp_Ki = 0;
-double starting_bias = 7;
+double starting_bias = 6.5;
 
 // other definitions
 int p1, p2;
 double robot_angle;
 int control_decision = 0;
-
-<<<<<<< HEAD
-=======
-
-//info
-enum state {idle,forward_drive, backup, left_turn,right_turn};
+double factor1 = 1;
+double factor2 = 1;
+bool toggle = false;
+
+// receive info
+enum state {idle,forward, backup, left_turn,right_turn};
 state gesture_state = idle;
-int turning_speed;
-bool should_catapult;
-
->>>>>>> 206c86daf8a79e890468a8966aa9a831e7c4b4e7
+state command = idle;
+
 //========================================== don't see this section ===========================================//
 // volatile interrupt data
 volatile double motor_speed = 0;

  }
  digitalWrite(5, HIGH);
  
  // =========================================== 2. update sensor data ============================================== //
  while (i2cRead(0x3B, i2cData, 14));
  accX = ((i2cData[0] << 8) | i2cData[1]);
  accY = ((i2cData[2] << 8) | i2cData[3]);

void timeOut2Handler() {
  if (micros() - last_time2 > 5000) motor_speed2 = 0;
}
// ========================================= don't see above section =======================================//

void receive_info() {
  int raw_command = Serial.read() - 49;
  // Integrity checking
  if (raw_command < idle || raw_command > right_turn) {
    Serial.print("Fail state");
    return;
  }
  command = (state)raw_command;
  Serial.print(command);
}

void setup() {
  Serial.begin(115200);
  digitalWrite(8,LOW);
  pinMode(21, OUTPUT);
  pinMode(12, OUTPUT);
  pinMode(13, OUTPUT);
