Integrate values from a Gyroscope

I’m still having problems with this. I need to use a gyroscope to receive angular orientation in space. I now the gyro gives values that are the change of angular displacement over time. And I know that to get angular orientation I need to integrate these values. Herein lies the problem. I have been trying to integrate the values in max/msp and I’m confident that the maths are correct but what I’m getting when the gyro is stationary is a steady rise in values after the integration. Is this drift? If it is or it isn’t how do I overcome this problem? Is this a problem with max and should I be integrating in arduino?

a steady rise in values after the integration.

This is probably due to noise accumulating. You could implement a threshold so that a reading is not added into the integration unless it is greater than a certain amount.