An easy way to combine accelerometer and gyroscope data is by the use of a complementary filter. This way, you don't have problems with drift from the gyroscope and noise from the accelerometer. It is also much easier to understand and use than a Kalman filter.
You will calculate the angle from the gyroscope using an integral. And for the accelerometer you will use a tan2 function to determine the position of the gravity vector. The complementary filter would then combine these two angles as follows:
angle = 0.98*(angle + gyroData*dt) + 0.02*accAngle
Notice how you only take a fraction of the accelerometer data (just enough to compensate for the drift). You will thus use the gyroscope data for fast changes, but on the long run, you will keep following the mean value of the accelerometer angle calculation so that you don't drift.
I hope this helps. If you need more info and a C code example, I wrote an article about it here