I have a gyro sensor and am trying to use it to determine angular displacement. The basic equation i am using is:
degree=degree+(angv*time)
delay(time)
When it is in the 0degree position there is a slight drift which i expect. However, when i move the gyro a little and return it back to its original position the gyro returns some insane amount such as 3 degrees or even 5degrees. the drift at the beginning appears to be at an extremly slow rate therefore getting a reading of 5 or 3 degrees at an actual stable/0 degree position is crazy. I have no idea what is going wrong with this. It makes me wonder how on earth a segway doesnt fall over.