Skip to content

Commit fd40f46

Browse files
authored
update readme.md (#44)
- update readme.md - minor edits
1 parent b0a5174 commit fd40f46

File tree

6 files changed

+39
-18
lines changed

6 files changed

+39
-18
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
66
and this project adheres to [Semantic Versioning](http://semver.org/).
77

88

9+
## [0.4.1] - 2023-11-02
10+
- update readme.md
11+
- minor edits
12+
13+
914
## [0.4.0] - 2023-06-11
1015
- fix #42 roll + pitch "jumps" after full rotation.
1116
- fixed normalization code.

GY521.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//
22
// FILE: GY521.cpp
33
// AUTHOR: Rob Tillaart
4-
// VERSION: 0.4.0
4+
// VERSION: 0.4.1
55
// PURPOSE: Arduino library for I2C GY521 accelerometer-gyroscope sensor
66
// URL: https://github.com/RobTillaart/GY521
77

@@ -124,7 +124,7 @@ int16_t GY521::read()
124124

125125
// duration interval
126126
now = micros();
127-
float duration = (now - _lastMicros) * 1e-6; // duration in seconds.
127+
float duration = (now - _lastMicros) * 1e-6; // duration in seconds.
128128
_lastMicros = now;
129129

130130

@@ -180,7 +180,7 @@ int16_t GY521::read()
180180
// correction at 375 due to the factor 0.96 in pitch
181181
if (_gay >= 375) _gay -= 375;
182182
else if (_gay < 0) _gay += 375;
183-
// correction at 360
183+
// correction at 360
184184
if (_gaz >= 360) _gaz -= 360;
185185
else if (_gaz < 0) _gaz += 360;
186186
}
@@ -335,7 +335,7 @@ int16_t GY521::readGyro()
335335
// correction at 375 due to the factor 0.96 in pitch
336336
if (_gay >= 375) _gay -= 375;
337337
else if (_gay < 0) _gay += 375;
338-
// correction at 360
338+
// correction at 360
339339
if (_gaz >= 360) _gaz -= 360;
340340
else if (_gaz < 0) _gaz += 360;
341341
}
@@ -376,7 +376,7 @@ bool GY521::setAccelSensitivity(uint8_t as)
376376
{
377377
return false;
378378
}
379-
// no need to write same value
379+
// no need to write same value
380380
if (((val >> 3) & 3) != _afs)
381381
{
382382
val &= 0xE7;
@@ -386,7 +386,7 @@ bool GY521::setAccelSensitivity(uint8_t as)
386386
return false;
387387
}
388388
}
389-
// calculate conversion factor. // 4 possible values => lookup table?
389+
// calculate conversion factor. // 4 possible values => lookup table?
390390
_raw2g = (1 << _afs) * GY521_RAW2G;
391391
return true;
392392
}
@@ -397,7 +397,7 @@ uint8_t GY521::getAccelSensitivity()
397397
uint8_t val = getRegister(GY521_ACCEL_CONFIG);
398398
if (_error != GY521_OK)
399399
{
400-
return _error; // return and propagate error (best thing to do)
400+
return _error; // return and propagate error (best thing to do)
401401
}
402402
_afs = (val >> 3) & 3;
403403
return _afs;
@@ -423,7 +423,7 @@ bool GY521::setGyroSensitivity(uint8_t gs)
423423
return false;
424424
}
425425
}
426-
// calculate conversion factor..
426+
// calculate conversion factor..
427427
// 4 possible values => lookup table?
428428
_raw2dps = (1 << _gfs) * GY521_RAW2DPS;
429429
return true;
@@ -487,5 +487,5 @@ int16_t GY521::_WireRead2()
487487
}
488488

489489

490-
// -- END OF FILE --
490+
// -- END OF FILE --
491491

GY521.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,16 @@
22
//
33
// FILE: GY521.h
44
// AUTHOR: Rob Tillaart
5-
// VERSION: 0.4.0
5+
// VERSION: 0.4.1
66
// PURPOSE: Arduino library for I2C GY521 accelerometer-gyroscope sensor
77
// URL: https://github.com/RobTillaart/GY521
8-
//
98

109

1110
#include "Arduino.h"
1211
#include "Wire.h"
1312

1413

15-
#define GY521_LIB_VERSION (F("0.4.0"))
14+
#define GY521_LIB_VERSION (F("0.4.1"))
1615

1716

1817
// THROTTLE TIMING

README.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@
22
[![Arduino CI](https://github.com/RobTillaart/GY521/workflows/Arduino%20CI/badge.svg)](https://github.com/marketplace/actions/arduino_ci)
33
[![Arduino-lint](https://github.com/RobTillaart/GY521/actions/workflows/arduino-lint.yml/badge.svg)](https://github.com/RobTillaart/GY521/actions/workflows/arduino-lint.yml)
44
[![JSON check](https://github.com/RobTillaart/GY521/actions/workflows/jsoncheck.yml/badge.svg)](https://github.com/RobTillaart/GY521/actions/workflows/jsoncheck.yml)
5+
[![GitHub issues](https://img.shields.io/github/issues/RobTillaart/GY521.svg)](https://github.com/RobTillaart/GY521/issues)
6+
57
[![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/RobTillaart/GY521/blob/master/LICENSE)
68
[![GitHub release](https://img.shields.io/github/release/RobTillaart/GY521.svg?maxAge=3600)](https://github.com/RobTillaart/GY521/releases)
9+
[![PlatformIO Registry](https://badges.registry.platformio.org/packages/robtillaart/library/GY521.svg)](https://registry.platformio.org/libraries/robtillaart/GY521)
710

811

912
# GY521
@@ -164,19 +167,33 @@ See examples, use with care
164167
#### Must
165168

166169
- improve documentation
170+
- add tables where appropriate
171+
- sensitivity, error codes etc
167172
- test test and test ...(ESP too)
168173

169-
170174
#### Should
171175

176+
- add performance sketch
177+
172178
#### Could
173179

174180
- calibrate sketch could print code snippet to include...
181+
- add examples
182+
- improve unit tests?
175183

176184
#### Wont
177185

178186
- look for maths optimizations (atan, hypot, performance)
179-
- ==> hypot optimized.
187+
- ==> hypot optimized (fastTrig?)
180188
- other ideas affect accuracy, so unless new ideas arise.
181189
- calibrate function in the lib
182190
- not as lib will grow too large.
191+
192+
## Support
193+
194+
If you appreciate my libraries, you can support the development and maintenance.
195+
Improve the quality of the libraries by providing issues and Pull Requests, or
196+
donate through PayPal or GitHub sponsors.
197+
198+
Thank you,
199+

library.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
"type": "git",
1616
"url": "https://github.com/RobTillaart/GY521.git"
1717
},
18-
"version": "0.4.0",
18+
"version": "0.4.1",
1919
"license": "MIT",
20-
"frameworks": "arduino",
20+
"frameworks": "*",
2121
"platforms": "*",
2222
"headers": "GY521.h"
2323
}

library.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
name=GY521
2-
version=0.4.0
2+
version=0.4.1
33
author=Rob Tillaart <[email protected]>
44
maintainer=Rob Tillaart <[email protected]>
55
sentence=Arduino library for GY521 angle measurement
66
paragraph=
77
category=Sensors
88
url=https://github.com/RobTillaart/GY521
99
architectures=*
10-
includes=GY521.h
10+
includes=GY521.h
1111
depends=

0 commit comments

Comments
 (0)