Skip to content

Commit

Permalink
update library.json, license, minor edits (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
RobTillaart authored Dec 18, 2021
1 parent f257329 commit d85def3
Show file tree
Hide file tree
Showing 14 changed files with 40 additions and 35 deletions.
4 changes: 3 additions & 1 deletion GY521.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// FILE: GY521.cpp
// AUTHOR: Rob Tillaart
// VERSION: 0.3.5
// VERSION: 0.3.6
// PURPOSE: Arduino library for I2C GY521 accelerometer-gyroscope sensor
// URL: https://github.com/RobTillaart/GY521
//
Expand All @@ -23,6 +23,7 @@
// 0.3.3 2021-07-05 fix #22 improve maths
// 0.3.4 2021-07-12 fix #24 improve precision
// 0.3.5 2021-10-20 update build-CI, badges + #28 add wakeup to begin().
// 0.3.6 2021-12-18 update library.json, license, minor edits


#include "GY521.h"
Expand Down Expand Up @@ -317,3 +318,4 @@ int16_t GY521::_WireRead2()


// -- END OF FILE --

4 changes: 2 additions & 2 deletions GY521.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// FILE: GY521.h
// AUTHOR: Rob Tillaart
// VERSION: 0.3.5
// VERSION: 0.3.6
// PURPOSE: Arduino library for I2C GY521 accelerometer-gyroscope sensor
// URL: https://github.com/RobTillaart/GY521
//
Expand All @@ -15,7 +15,7 @@
#include "Wire.h"


#define GY521_LIB_VERSION (F("0.3.5"))
#define GY521_LIB_VERSION (F("0.3.6"))


#ifndef GY521_THROTTLE_TIME
Expand Down
2 changes: 2 additions & 0 deletions GY521_registers.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,6 @@
#define GY521_FIFO_R_W 0x74
#define GY521_WHO_AM_I 0x75


// -- END OF FILE --

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2017-2021 Rob Tillaart
Copyright (c) 2017-2022 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
Expand Down
27 changes: 14 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@
[![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/RobTillaart/GY521/blob/master/LICENSE)
[![GitHub release](https://img.shields.io/github/release/RobTillaart/GY521.svg?maxAge=3600)](https://github.com/RobTillaart/GY521/releases)


# GY521

Arduino library for I2C GY521 accelerometer-gyroscope sensor a.k.a. MCU-6050
Arduino library for I2C GY521 accelerometer-gyroscope sensor a.k.a. MCU-6050.


## Description

Experimental library for GY521 a.k.a. MCU-6050
Experimental library for GY521 a.k.a. MCU-6050.

Library is work in progress, in fact it is extracted and extended from an old project.
It needs to be tested a lot more.
Expand Down Expand Up @@ -68,7 +69,7 @@ AD0 connected to VCC => 0x69
- **bool begin()** Returns true if address can be found on I2C bus.
- **bool isConnected()** returns true if device can be found on I2C bus.
- **void reset()** set all internal values to 0 and throttle time to 10 ms.
- **bool wakeUp()**
- **bool wakeUp()** idem.


### Throttle
Expand Down Expand Up @@ -122,6 +123,16 @@ Read the register PDF for the specific value and meaning of registers.
- **uint8_t getRegister(uint8_t reg)**


## documents

- check details - MPU-6000-Register-Map1.pdf


## Operation

See examples, use with care


## Future

**Should**
Expand All @@ -135,13 +146,3 @@ Read the register PDF for the specific value and meaning of registers.
- calibrate sketch could print code snippet to include...
- option to read only Accel?
- option to read only Gyro?

## documents

- check details - MPU-6000-Register-Map1.pdf


## Operation

See examples, use with care

5 changes: 3 additions & 2 deletions examples/GY521_performance/GY521_performance.ino
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//
// FILE: GY521_performance.ino
// AUTHOR: Rob Tillaart
// VERSION: 0.1.0
// PURPOSE: minimal demo
// DATE: 2021-06-13

Expand Down Expand Up @@ -44,4 +43,6 @@ void loop()
delay(1000);
}

// -- END OF FILE --

// -- END OF FILE --

5 changes: 2 additions & 3 deletions examples/GY521_pitch_roll_yaw/GY521_pitch_roll_yaw.ino
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
//
// FILE: GY521_pitch_roll_yaw.ino
// AUTHOR: Rob Tillaart
// VERSION: 0.1.0
// PURPOSE: demo PRY
// PURPOSE: demo pitch roll yaw
// DATE: 2020-08-06


Expand Down Expand Up @@ -32,7 +31,7 @@ void setup()

sensor.setThrottle();
Serial.println("start...");

// set calibration values from calibration sketch.
sensor.axe = 0;
sensor.aye = 0;
Expand Down
3 changes: 1 addition & 2 deletions examples/readCalibration/readCalibration.ino
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//
// FILE: readCalibration.ino
// AUTHOR: Rob Tillaart
// VERSION: 0.1.0
// PURPOSE: read the calibration values / errors for a flat sensor.
// DATE: 2020-07-14

Expand Down Expand Up @@ -105,7 +104,7 @@ void loop()
sensor.gxe += gx * 0.05;
sensor.gye += gy * 0.05;
sensor.gze += gz * 0.05;

counter++;
delay(100);
}
Expand Down
4 changes: 2 additions & 2 deletions examples/test1/test1.ino
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
//
// FILE: test1.ino
// AUTHOR: Rob Tillaart
// VERSION: 0.1.0
// PURPOSE: minimal demo
// PURPOSE: minimal demo to test working of the sensor.
// DATE: 2020-07-01


Expand Down Expand Up @@ -42,6 +41,7 @@ void setup()
sensor.gze = 0;
}


void loop()
{
sensor.read();
Expand Down
3 changes: 1 addition & 2 deletions examples/test_2/test_2.ino
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
//
// FILE: test_2.ino
// AUTHOR: Rob Tillaart
// VERSION: 0.1.0
// PURPOSE: test set/get
// PURPOSE: test set/get functions
// DATE: 2020-08-06


Expand Down
7 changes: 5 additions & 2 deletions keywords.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Syntax Coloring Map for GY521
# Syntax Colouring Map for GY521

# Datatypes (KEYWORD1)

# Data types (KEYWORD1)
GY521 KEYWORD1


# Methods and Functions (KEYWORD2)
begin KEYWORD2
isConnected KEYWORD2
Expand Down Expand Up @@ -39,6 +41,7 @@ setRegister KEYWORD2
getRegister KEYWORD2
getError KEYWORD2


# Constants (LITERAL1)
GY521_LIB_VERSION LITERAL1
GY521_THROTTLE_TIME LITERAL1
Expand Down
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"type": "git",
"url": "https://github.com/RobTillaart/GY521.git"
},
"version": "0.3.5",
"version": "0.3.6",
"license": "MIT",
"frameworks": "arduino",
"platforms": "*",
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=GY521
version=0.3.5
version=0.3.6
author=Rob Tillaart <[email protected]>
maintainer=Rob Tillaart <[email protected]>
sentence=Arduino library for GY521 angle measurement
Expand Down
5 changes: 2 additions & 3 deletions test/unit_test_001.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@

unittest_setup()
{
fprintf(stderr, "GY521_LIB_VERSION: %s\n", (char *) GY521_LIB_VERSION);
}


Expand All @@ -42,7 +43,7 @@ unittest_teardown()
unittest(test_constructor)
{
GY521 sensor(0x69);
fprintf(stderr, "VERSION: %s\n", (char *) GY521_LIB_VERSION);

sensor.begin();
assertEqual(GY521_OK, sensor.getError());

Expand Down Expand Up @@ -97,8 +98,6 @@ unittest(test_get_set_sensitivity)

unittest(test_constants)
{
fprintf(stderr, "VERSION: %s\n", (char *) GY521_LIB_VERSION);

assertEqual(GY521_OK, 0);
assertEqual(GY521_THROTTLED, 1);
assertEqual(GY521_ERROR_READ, -1);
Expand Down

0 comments on commit d85def3

Please sign in to comment.