Skip to content

Commit 6b3b2fb

Browse files
authored
Update GY-85.cpp (#5)
The readings of the gyroscope were incorrect, axis [0] received the value of the angular velocity the Y-axis and axis [1] received the value of the angular velocity the X-axis.
1 parent 0c98094 commit 6b3b2fb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

GY_85.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,8 @@ float* GY_85::readGyro()
151151
}
152152
Wire.endTransmission();
153153

154-
axis[0] = ((buff[4] << 8) | buff[5]) - g_offx;
155-
axis[1] = ((buff[2] << 8) | buff[3]) - g_offy;
154+
axis[0] = ((buff[2] << 8) | buff[3]) - g_offx;
155+
axis[1] = ((buff[4] << 8) | buff[5]) - g_offy;
156156
axis[2] = ((buff[6] << 8) | buff[7]) - g_offz;
157157
axis[3] = ((buff[0] << 8) | buff[1]); // temperature
158158

0 commit comments

Comments
 (0)