gyro sensor to measure angle

Hello,
I think the title is pretty self explained.
I want to measure angles with a gyro sensor.
I am using the GY-521/MPU6050 with arduino uno, and I got the code from the internet.

If I got it right, the code is measuring raidans/sec, or degrees/sec.
Of course, with that sensor I am able to measure also temperature and acceleration.

My question is, is there any way to convert the current values to angle in radians or to degrees?
also, from other codes from the internet, I got really wired acceleration values. I know that the x and y should be 0 while standing, and the z should be 10 because earth. (its 9,8 actually...), and I got numbers in the range of -1000 to 1000.

Am I missing something with the units? and again, what about the angle??

I will be very happy to get information, example codes, and links to other sites.

Thanks for ANY help and comment,
Arad.

The gyro does not measure angles, it measures rate of rotation.

The accelerometer can be used to measure tilt angles, if the sensor is held still. See this overview.

I got really wired acceleration values

You get the internal sensor units for acceleration values. Consult the MPU-6050 data sheet to learn how to convert these internal units to units of m/s^2.

Hello jremington,
I know that the gyro measures the rate of rotation.
I asked if there is a way to measure angle with the gyro sensor.

In theory you should be able to measure the amount of rotation you did over time, and if you know the original angle you can calculate your new angle.
Note that as the rate of rotation (the value your sensor returns) is the first derivative of the angle vs time, you have to add up all those values (basically perform a numerical integration) to get to the current angle. This of course has an error, the errors add up over time, and soon enough you will be pretty far off. It's like trying to measure speed using an accelerometer, same problem.

I asked if there is a way to measure angle with the gyro sensor.

You cannot measure an angle using a rate gyro. You can measure only the change from a starting angle, and even then, only for a short period of time.

In addition to the comments of reply #3, rate gyros drift and the drift rate depends on temperature.

So, using just a rate gyro, it is impossible to measure long term changes in an angle.