 int xDir;
 int yDir;
 int buttonVal;
+
+
+int zeroLine = 50;
 
 void setup(void)
 {

//    Serial.println(yDir);


    theMessage = "";

    

  }


    if ((abs(xDir) - abs(yDir)) > zeroLine) //user is trying to go forward and backward
    {
      if(xDir > zeroLine)
      {
        analogWrite(l1_motor, xDir);
        analogWrite(l2_motor, 0);
        
        analogWrite(r1_motor, xDir);
        analogWrite(r2_motor, 0);
      }
      else if(xDir < -zeroLine)
      {
        analogWrite(l2_motor, abs(xDir));
        analogWrite(l1_motor, abs(0));
        
        analogWrite(r2_motor, abs(xDir));
        analogWrite(r1_motor, abs(0));
      }
      else 
      {
        analogWrite(l2_motor, 0);
        analogWrite(l1_motor, abs(0));
        
        analogWrite(r1_motor, 0);
        analogWrite(r2_motor, abs(0));      
      }
    }
    else if
    {
      if(yDir > zeroLine) //turn right
      {
        analogWrite(l1_motor, 0);
        analogWrite(l2_motor, 0);
        
        analogWrite(r1_motor, yDir);
        analogWrite(r2_motor, 0);
      }
      else if(yDir < -zeroLine) //turn left
      {
        analogWrite(l2_motor, abs(yDir));
        analogWrite(l1_motor, abs(0));
        
        analogWrite(r2_motor, 0);
        analogWrite(r1_motor, 0);
      }
      else 
      {
        analogWrite(l2_motor, 0);
        analogWrite(l1_motor, 0);
        
        analogWrite(r1_motor, 0);
        analogWrite(r2_motor, 0);      
      }
    }
    else
    {
      analogWrite(l2_motor, 0);
      analogWrite(l1_motor, 0);
        
      analogWrite(r1_motor, 0);
      analogWrite(r2_motor, 0); 
    }
    



//    //Serial.println(theMessage);
//    Serial.print(buttonVal); Serial.print('\t');
