diff --git a/CHANGELOG.md b/CHANGELOG.md index e2c9010..3a94780 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## [0.6.2] - 2026-01-03 +- update GitHub actions +- update examples +- minor edits + ## [0.6.1] - 2024-07-25 Co-authored-by: Maik Menz - redo of **calibrate()** function, Kudos to Maik Menz. @@ -17,7 +22,6 @@ Co-authored-by: Maik Menz - update readme.md - improve initialization - ## [0.6.0] - 2024-06-22 - fix #54, calibrate() function, Kudos to jens-kuerten and MArimont3 - minor edits diff --git a/GY521.cpp b/GY521.cpp index bb80b7f..14eee3b 100644 --- a/GY521.cpp +++ b/GY521.cpp @@ -1,7 +1,7 @@ // // FILE: GY521.cpp // AUTHOR: Rob Tillaart -// VERSION: 0.6.1 +// VERSION: 0.6.2 // PURPOSE: Arduino library for I2C GY521 accelerometer-gyroscope sensor // URL: https://github.com/RobTillaart/GY521 diff --git a/GY521.h b/GY521.h index 5f6757d..ecbf812 100644 --- a/GY521.h +++ b/GY521.h @@ -2,7 +2,7 @@ // // FILE: GY521.h // AUTHOR: Rob Tillaart -// VERSION: 0.6.1 +// VERSION: 0.6.2 // PURPOSE: Arduino library for I2C GY521 accelerometer-gyroscope sensor // URL: https://github.com/RobTillaart/GY521 @@ -11,7 +11,7 @@ #include "Wire.h" -#define GY521_LIB_VERSION (F("0.6.1")) +#define GY521_LIB_VERSION (F("0.6.2")) const float GRAVITY = 9.80655; @@ -32,10 +32,10 @@ const float GRAVITY = 9.80655; // CONVERSION CONSTANTS -#define GY521_RAD2DEGREES (180.0 / PI) -#define GY521_DEGREES2RAD (PI / 180.0) -#define GY521_RAW2DPS (1.0 / 131.0) -#define GY521_RAW2G (1.0 / 16384.0) +#define GY521_RAD2DEGREES (180.0 / PI) +#define GY521_DEGREES2RAD (PI / 180.0) +#define GY521_RAW2DPS (1.0 / 131.0) +#define GY521_RAW2G (1.0 / 16384.0) class GY521 diff --git a/GY521_registers.h b/GY521_registers.h index ae6a550..230a558 100644 --- a/GY521_registers.h +++ b/GY521_registers.h @@ -1,7 +1,7 @@ // // FILE: GY521_registers.h // AUTHOR: Rob Tillaart -// VERSION: see GY521.cpp +// VERSION: see GY521.cpp / CHANGELOG.md // PURPOSE: Arduino library for I2C GY521 accelerometer-gyroscope sensor // URL: https://github.com/RobTillaart/GY521 // diff --git a/LICENSE b/LICENSE index a435724..dd89d54 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2017-2024 Rob Tillaart +Copyright (c) 2017-2026 Rob Tillaart Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 29e84ce..a8f488c 100644 --- a/README.md +++ b/README.md @@ -24,17 +24,17 @@ It needs to be tested a lot more. See changelog.md for latest updates. -#### 0.6.1 +### 0.6.1 Improved **calibrate()** to support any angle. -#### 0.6.0 +### 0.6.0 Fixed a bug in calibration function, making previous versions obsolete. -#### 0.5.0 Breaking change +### 0.5.0 Breaking change Version 0.5.0 introduced a breaking change. You cannot set the pins in **begin()** any more. @@ -43,7 +43,7 @@ The user has to call **Wire.begin()** and can optionally set the Wire pins before calling **begin()**. -#### Examples +### Examples - **GY521_angle** read angleX, angleY, angleZ. - **GY521_performance_calibrate.ino** determine calibration performance. @@ -58,7 +58,7 @@ for analysis e.g. in a spreadsheet. - **GY521_two_sensors** demo for two sensors. -#### Related +### Related - https://invensense.tdk.com/wp-content/uploads/2015/02/MPU-6000-Datasheet1.pdf - https://cdn.sparkfun.com/datasheets/Sensors/Accelerometers/RM-MPU-6000A.pdf register map. @@ -82,7 +82,7 @@ From left to right | 7 | INT | interrupt | -#### Address +### Address AD0 connected to GND => 0x68 AD0 connected to VCC => 0x69 @@ -102,7 +102,7 @@ sensor can be calibrated in any angle. **bool calibrate(times, angleX = 0, angleY = 0, inverted = false)** -#### Manual calibration +### Manual calibration 1. load and run calibration example it shows a header containing 6 numbers and 10 lines of 8 numbers @@ -209,7 +209,7 @@ One must explicitly call **read()** to get new values. #### Experimental Pitch Roll and Yaw -Pitch Roll and Yaw is work in progress and should not be used for projects yet. +Pitch Roll and Yaw is **work in progress** and should not be used for projects yet. - **float getPitch()** idem. May return any number. If **setNormalize(true)** return value will be 0-359.999 @@ -250,7 +250,7 @@ Read the register PDF for the specific value and meaning of registers. - check details registers - MPU-6000-Register-Map1.pdf -#### Error codes +### Error codes | Error code | value | notes | |:----------------------------|:-------:|:-------:| @@ -261,7 +261,7 @@ Read the register PDF for the specific value and meaning of registers. | GY521_ERROR_NOT_CONNECTED | -3 | -#### Sensitivity Acceleration +### Sensitivity Acceleration The strength of Earth's gravity varies with latitude (equator = 0°, poles = 90°). The standard value for gravity (gn) is 9.80665 m/s^2 (often 9.81 m/s^2) @@ -278,7 +278,7 @@ The library provides the constant GRAVITY = 9.80655 | 3 | 16 g | 156.9048 | -#### Sensitivity Gyroscope +### Sensitivity Gyroscope unit dps = degrees per second. @@ -302,12 +302,11 @@ However if one specific is needed, please open an issue. #### Must -- time -- improve documentation - investigate Pitch Roll and Yaw math in detail. - investigate math needed. - implementation. - when? +- improve documentation - test test and test ...(ESP too) #### Should diff --git a/examples/GY521_angle/GY521_angle.ino b/examples/GY521_angle/GY521_angle.ino index 5b8c8f7..ea453f9 100644 --- a/examples/GY521_angle/GY521_angle.ino +++ b/examples/GY521_angle/GY521_angle.ino @@ -19,6 +19,7 @@ void setup() Serial.println(__FILE__); Serial.print("GY521_LIB_VERSION: "); Serial.println(GY521_LIB_VERSION); + Serial.println(); Wire.begin(); diff --git a/examples/GY521_performance/GY521_performance.ino b/examples/GY521_performance/GY521_performance.ino index 0973ad3..358d502 100644 --- a/examples/GY521_performance/GY521_performance.ino +++ b/examples/GY521_performance/GY521_performance.ino @@ -1,7 +1,7 @@ // // FILE: GY521_performance.ino // AUTHOR: Rob Tillaart -// PURPOSE: minimal demo +// PURPOSE: performance measurements // URL: https://github.com/RobTillaart/GY521 #include "GY521.h" @@ -19,6 +19,7 @@ void setup() Serial.println(__FILE__); Serial.print("GY521_LIB_VERSION: "); Serial.println(GY521_LIB_VERSION); + Serial.println(); Wire.begin(); @@ -36,12 +37,12 @@ void loop() uint32_t start = micros(); int16_t x = sensor.read(); uint32_t duration = micros() - start; - + Serial.print(x); Serial.print('\t'); Serial.print(duration); Serial.println(); - + delay(1000); } diff --git a/examples/GY521_performance_calibrate/GY521_performance_calibrate.ino b/examples/GY521_performance_calibrate/GY521_performance_calibrate.ino index c6a979b..75e23f5 100644 --- a/examples/GY521_performance_calibrate/GY521_performance_calibrate.ino +++ b/examples/GY521_performance_calibrate/GY521_performance_calibrate.ino @@ -1,7 +1,7 @@ // // FILE: GY521_performance_calibrate.ino // AUTHOR: Rob Tillaart -// PURPOSE: read angleX, angleY, angleZ +// PURPOSE: measure calibration performance // URL: https://github.com/RobTillaart/GY521 @@ -17,6 +17,7 @@ void setup() Serial.println(__FILE__); Serial.print("GY521_LIB_VERSION: "); Serial.println(GY521_LIB_VERSION); + Serial.println(); Wire.begin(); diff --git a/examples/GY521_pitch_roll_yaw/GY521_pitch_roll_yaw.ino b/examples/GY521_pitch_roll_yaw/GY521_pitch_roll_yaw.ino index 8052a88..500ff48 100644 --- a/examples/GY521_pitch_roll_yaw/GY521_pitch_roll_yaw.ino +++ b/examples/GY521_pitch_roll_yaw/GY521_pitch_roll_yaw.ino @@ -3,7 +3,8 @@ // AUTHOR: Rob Tillaart // PURPOSE: demo pitch roll yaw // URL: https://github.com/RobTillaart/GY521 - +// +// WORK IN PROGRESS - not working well #include "GY521.h" @@ -19,7 +20,9 @@ void setup() Serial.println(__FILE__); Serial.print("GY521_LIB_VERSION: "); Serial.println(GY521_LIB_VERSION); + Serial.println(); Serial.println("warning: Pitch roll yaw is work in progress."); + Serial.println(); Wire.begin(); diff --git a/examples/GY521_raw_cooked/GY521_raw_cooked.ino b/examples/GY521_raw_cooked/GY521_raw_cooked.ino index 58cde87..cc92004 100644 --- a/examples/GY521_raw_cooked/GY521_raw_cooked.ino +++ b/examples/GY521_raw_cooked/GY521_raw_cooked.ino @@ -19,6 +19,7 @@ void setup() Serial.println(__FILE__); Serial.print("GY521_LIB_VERSION: "); Serial.println(GY521_LIB_VERSION); + Serial.println(); Wire.begin(); diff --git a/examples/GY521_readCalibration_1/GY521_readCalibration_1.ino b/examples/GY521_readCalibration_1/GY521_readCalibration_1.ino index 1d6de0f..3c09d58 100644 --- a/examples/GY521_readCalibration_1/GY521_readCalibration_1.ino +++ b/examples/GY521_readCalibration_1/GY521_readCalibration_1.ino @@ -23,6 +23,7 @@ void setup() Serial.println(__FILE__); Serial.print("GY521_LIB_VERSION: "); Serial.println(GY521_LIB_VERSION); + Serial.println(); Wire.begin(); delay(100); diff --git a/examples/GY521_readCalibration_2/GY521_readCalibration_2.ino b/examples/GY521_readCalibration_2/GY521_readCalibration_2.ino index e7405e3..c8601ad 100644 --- a/examples/GY521_readCalibration_2/GY521_readCalibration_2.ino +++ b/examples/GY521_readCalibration_2/GY521_readCalibration_2.ino @@ -22,6 +22,7 @@ void setup() Serial.println(__FILE__); Serial.print("GY521_LIB_VERSION: "); Serial.println(GY521_LIB_VERSION); + Serial.println(); Wire.begin(); delay(100); @@ -77,7 +78,7 @@ void loop() Serial.print("sensor.aze = "); Serial.print(sensor.aze, 7); Serial.print(";\n"); - + Serial.print("sensor.gxe = "); Serial.print(sensor.gxe, 7); Serial.print(";\n"); diff --git a/examples/GY521_test_1/GY521_test_1.ino b/examples/GY521_test_1/GY521_test_1.ino index c99db75..4875f46 100644 --- a/examples/GY521_test_1/GY521_test_1.ino +++ b/examples/GY521_test_1/GY521_test_1.ino @@ -19,6 +19,7 @@ void setup() Serial.println(__FILE__); Serial.print("GY521_LIB_VERSION: "); Serial.println(GY521_LIB_VERSION); + Serial.println(); Wire.begin(); @@ -34,7 +35,7 @@ void setup() sensor.setThrottle(); Serial.println("start..."); - + // set calibration values from calibration sketch. sensor.axe = 0; sensor.aye = 0; diff --git a/examples/GY521_test_2/GY521_test_2.ino b/examples/GY521_test_2/GY521_test_2.ino index aa86e09..61c9567 100644 --- a/examples/GY521_test_2/GY521_test_2.ino +++ b/examples/GY521_test_2/GY521_test_2.ino @@ -17,6 +17,7 @@ void setup() Serial.println(__FILE__); Serial.print("GY521_LIB_VERSION: "); Serial.println(GY521_LIB_VERSION); + Serial.println(); Wire.begin(); diff --git a/examples/GY521_two_sensors/GY521_two_sensors.ino b/examples/GY521_two_sensors/GY521_two_sensors.ino index 46fcada..1de1063 100644 --- a/examples/GY521_two_sensors/GY521_two_sensors.ino +++ b/examples/GY521_two_sensors/GY521_two_sensors.ino @@ -20,6 +20,7 @@ void setup() Serial.println(__FILE__); Serial.print("GY521_LIB_VERSION: "); Serial.println(GY521_LIB_VERSION); + Serial.println(); Wire.begin(); diff --git a/library.json b/library.json index 9fb37e3..3299215 100644 --- a/library.json +++ b/library.json @@ -18,7 +18,7 @@ "type": "git", "url": "https://github.com/RobTillaart/GY521.git" }, - "version": "0.6.1", + "version": "0.6.2", "license": "MIT", "frameworks": "*", "platforms": "*", diff --git a/library.properties b/library.properties index b4c6415..51bfd2b 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=GY521 -version=0.6.1 +version=0.6.2 author=Rob Tillaart maintainer=Rob Tillaart sentence=Arduino library for GY521 angle measurement