@@ -18,6 +18,8 @@ Experimental library for GY521 a.k.a. MCU-6050.
1818Library is work in progress, in fact it is extracted and extended from an old project.
1919It needs to be tested a lot more.
2020
21+ See changelog.md for latest updates.
22+
2123
2224#### Examples
2325
@@ -93,6 +95,8 @@ AD0 connected to VCC => 0x69
9395- ** uint8_t getAccelSensitivity()** returns 0, 1, 2, 3
9496- ** bool setGyroSensitivity(uint8_t gs)** gs = 0,1,2,3 ==> 250, 500, 1000, 2000 degrees/second
9597- ** uint8_t getGyroSensitivity()** returns 0, 1, 2, 3
98+ = ** void setNormalize(bool normalize = true)** normalizes pitch roll yaw or not. Default true.
99+ = ** bool getNormalize()** returns flag.
96100
97101
98102#### Actual read
@@ -108,28 +112,33 @@ returns status = GY521_OK on success.
108112- ** uint32_t lastTime()** last time sensor is actually read. In milliseconds. Not updated by readTemperature().
109113
110114Since version 0.3.8 the ** read()** and ** readGyro()** function is updated to keep the range of ** getPitch()** ,
111- ** getRoll()** and ** getYaw()** in the range 0..360 degrees. (Issue #36 ).
112- Problem is that with continuous rotation in a same direction internal variables will overflow and new
115+ ** getRoll()** and ** getYaw()** in the range 0..359.999 degrees. (Issue #36 ).
116+ Problem is that with continuous rotation in a same direction internal variables will overflow and new
113117movements (angles) will get lost as insignificant digits.
114118
119+ In version 0.4.0 the normalization of pitch, roll and yaw is fixed and made conditional. (Issue #42 ).
120+
115121
116- #### Call after read
122+ #### Calls after read
117123
118124Note that multiple calls will return the same value. One must explicitly call ** read()** to get new values.
119125
120- - ** float getAccelX()** idem
121- - ** float getAccelY()** idem
122- - ** float getAccelZ()** idem
123- - ** float getAngleX()** idem
124- - ** float getAngleY()** idem
125- - ** float getAngleZ()** idem
126- - ** float getTemperature()** idem
127- - ** float getGyroX()** idem
128- - ** float getGyroY()** idem
129- - ** float getGyroZ()** idem
130- - ** float getPitch()** idem. Returns 0.00 - 359.99.
131- - ** float getRoll()** idem. Returns 0.00 - 359.99.
132- - ** float getYaw()** idem. Returns 0.00 - 359.99.
126+ - ** float getAccelX()** idem.
127+ - ** float getAccelY()** idem.
128+ - ** float getAccelZ()** idem.
129+ - ** float getAngleX()** idem.
130+ - ** float getAngleY()** idem.
131+ - ** float getAngleZ()** idem.
132+ - ** float getTemperature()** idem.
133+ - ** float getGyroX()** idem.
134+ - ** float getGyroY()** idem.
135+ - ** float getGyroZ()** idem.
136+ - ** float getPitch()** idem. May return any number.
137+ If ** setNormalize(true)** return value will be 0-359.999
138+ - ** float getRoll()** idem. May return any number.
139+ If ** setNormalize(true)** return value will be 0-359.999
140+ - ** float getYaw()** idem. May return any number.
141+ If ** setNormalize(true)** return value will be 0-359.999
133142
134143
135144### Register access
@@ -155,10 +164,10 @@ See examples, use with care
155164#### Must
156165
157166- improve documentation
167+ - test test and test ...(ESP too)
158168
159- #### Should
160169
161- - test test and test ...(ESP too)
170+ #### Should
162171
163172#### Could
164173
0 commit comments