ADXL 345 and ITG3200 trouble

Hi,

Im having trouble collecting data from this new IMU I have. Im trying to extract gyroscope’s values in degrees but getting stuck. i understand that i need to scale the raw data to reach deg/s which i have done (ITG Datasheet shows the scale factor to be 14.375) and then when i try to integrate this value using trapezoidal rule to collect the actual degree it spits out crazy values that change on how fast i move the IMU.

any help or suggestions will be much appreciated.

PS. Time is my sampling time and Zscaled0 is the previous sample with Zscaled1 the current sample.

angle += ((Zscaled1 - Zscaled0)/2) * Time;
  
  Serial.println(angle);
  Zscaled1 = Zscaled0;

not sure how to delete the thread but i have solved my problem now so thanks anyway