void loop() 
{
    corrValx = analogRead(potx);
    corrValx = map(corrValx, 0, 1023, -20, +20);
    corrValy = analogRead(poty);
    corrValy = map(corrValy, 0, 1023, -20, +20);
   
    mpu.getMotion6(&ax, &ay, &az, &gx, &gy, &gz); 
 
    //valx = map(ax, -17000, 17000, 179, 0);
    valx = map(ax, -17000, 17000, 60, 120);  // map to smaller range to avoid servo jittering

    if (valx > 103)
      valx = 103;
    if (valx < 77)
      valx = 77;
    valx = valx + corrValx;
    servox.write(valx); 
    
    //valy = map(ay, -17000, 17000, 179, 0);
    valy = map(ay, -17000, 17000, 60, 120);  // map to smaller range to avoid servo jittering

    if (valy > 103)
      valy = 103;
    if (valy < 77)
      valy = 77;       
    valy = valy + corrValy;  
    servoy.write(valy); 

    delay(10);        // wait for servo to move
}