This is not correct. lms.accelData.x (or y or z) is only updated after calls to lsm.read(). If you .read() it once then look at it 100 times it will be the same value.
gdavisiv:
for (int i=0; i<100; i++)
{
XSum += ((int)lsm.accelData.x);
//YSum += analogRead(YPin);
//ZSum += analogRead(ZPin);
}
lsm.read();
Not sure why you're getting a crazy value here though:
Serial.print(map(XSum/100, XMin, XMax, -2000, 2000));