Almost there! A bit more help please!!!

The gyro tells you how fast you are turning it. It has no absolute reference. That's why most controllers us an accelerometer: to detect deviations from level to use as controls.

To measure "how far did I turn" in order to determine when you move back to that position you have to take the speed of rotation times the amount of time it has been rotating at that speed and add that to the last known angle. The gyroscope will tend to drift.