Skip to content

Commit

Permalink
Final changes for 0.3 (#14)
Browse files Browse the repository at this point in the history
* Fixed issues with accelerometer offset

* New examples (#11)

* Create bandwidthExample.ino

* Create motionInterrupt.ino

* Create offsetCancellation.ino

* Update .travis.yml

* Code style corrections (#12)

* Update MPU9255.cpp

* Update MPU9255.h

* Update MPU9255_PowerControl.cpp

* Update MPU9255_Interrupts.cpp

* Update MPU9255_Data.cpp

* Update MPU9255_Communication.cpp

* Update bandwidthExample.ino

* Update dataProcessing.ino

* Update motionInterrupt.ino

* Update offsetCancellation.ino

* Update powerControl.ino

* Update rawData.ino

* Update scaleExample.ino

* Update sleepExample.ino

* Fixed magnetometer issues

* Doc update (#13)

* Update library.properties

* Rename doc.md to doc/doc.md

* Rename doc.md to main.md

* Rename main.md to index.md

* Update README.md

* Create settings.md

* Create measurements.md

* Create power.md

* Create interrupts.md

* Update index.md

* Update index.md

* Update settings.md

* Update power.md

* Update measurements.md

* Update interrupts.md

* small typo fix
  • Loading branch information
Bill2462 authored Mar 29, 2018
1 parent c6f3a20 commit 62813a4
Show file tree
Hide file tree
Showing 23 changed files with 1,112 additions and 413 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@ script:
- arduino --verify --board arduino:avr:uno $PWD/examples/scaleExample/scaleExample.ino
- arduino --verify --board arduino:avr:uno $PWD/examples/powerControl/powerControl.ino
- arduino --verify --board arduino:avr:uno $PWD/examples/sleepExample/sleepExample.ino
- arduino --verify --board arduino:avr:uno $PWD/examples/bandwidthExample/bandwidthExample.ino
- arduino --verify --board arduino:avr:uno $PWD/examples/motionInterrupt/motionInterrupt.ino
- arduino --verify --board arduino:avr:uno $PWD/examples/offsetCancellation/offsetCancellation.ino
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
# MPU9255-Arduino-Library
[![Build Status](https://travis-ci.org/Bill2462/MPU9255-Arduino-Library.svg?branch=master)](https://travis-ci.org/Bill2462/MPU9255-Arduino-Library)
![](https://img.shields.io/badge/language-C%2B%2B-brightgreen.svg)
![](https://img.shields.io/badge/platform-arduino-brightgreen.svg)
[![GitHub release](https://img.shields.io/github/release/Bill2462/MPU9255-Arduino-Library.svg?maxAge=3600)](https://github.com/Bill2462/MPU9255-Arduino-Library/releases/latest)
[![License](https://img.shields.io/github/license/Bill2462/MPU9255-Arduino-Library.svg?maxAge=3600)](LICENSE)

Arduino library for MPU9255 based modules.


Read acceleration, angular velocity and magnetic field strength on your Arduino board using MPU9266 based IMU module connected via the I2C interface.

## What works ?
## What works?
- Acceleration, angular velocity, magnetic field measurements.
- Scale selection (from +- 2g , +- 250 dps to +- 16g , +-2000 dps).
- Dice temperature measurements using build-in sensor.
- Selectable scale (from +- 2g , +- 250 dps to +- 16g , +-2000 dps).
- Selectable bandwidth for gyroscope and accelerometer.
- Power control (sleep mode, enabling / disabling internal components).
- Reset control.
- Temperature measurements using build-in sensor.
- Motion interrupt support.

## Compatible IDE
Library is compatible with arduino IDE 1.6 or newer.
Expand All @@ -33,4 +34,4 @@ Library is compatible with arduino IDE 1.6 or newer.
4. Select location of downloaded library and click "open".

## Library documentation
https://github.com/Bill2462/MPU9255-Arduino-Library/blob/master/doc.md
https://github.com/Bill2462/MPU9255-Arduino-Library/blob/master/doc/index.md
180 changes: 0 additions & 180 deletions doc.md

This file was deleted.

19 changes: 19 additions & 0 deletions doc/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
### Welcome to MPU9255 arduino library documentation

### Index :

### Settings

https://github.com/Bill2462/MPU9255-Arduino-Library/blob/master/doc/settings.md

### Measurements

https://github.com/Bill2462/MPU9255-Arduino-Library/blob/master/doc/measurements.md

### Power control

https://github.com/Bill2462/MPU9255-Arduino-Library/blob/master/doc/power.md

### Interrupts

https://github.com/Bill2462/MPU9255-Arduino-Library/blob/master/doc/interrupts.md
113 changes: 113 additions & 0 deletions doc/interrupts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
# Interrupts


## General interrupt configuration

`void set_INT_active_state(interrupt_pin selected_mode)`

Set INT pin (MPU9255 interrupt output pin) active state.

- Parameters:
- `interrupt_pin selected_mode` - Selected active state.
- Returns: None

Valid values of selected active state parameter:
- `active_low` - Pin will go low when interrupt is detected.
- `active_high` - Pin will go high when interrupt is detected.

--------------

`void set_INT_pin_mode(interrupt_pin selected_mode)`

Set INT pin operation mode.

- Parameters:
- `interrupt_pin selected_mode` - Selected mode.
- Returns: None

Valid pin modes:
- `open_drain` - Pin will operate in open-drain mode (external pullup resistor is required).
- `push_pull` - Pin will operate in push-pull mode (no external components required).

--------------

`void set_INT_signal_mode(interrupt_pin selected_mode)`

Set INT pin output signal mode.

- Parameters:
- `interrupt_pin selected_mode` - Selected output signal mode.
- Returns: None

Valid output signal modes:
- `latched_output` - When interrupt is detected, pin will go into active state until interrupt flag is cleared.
- `pulse_output` - When interrupt is detected, pin will generate short pulse.

-----------------------

`void enable_interrupt_output(interrupts selected_interrupt)`

Enable selected interrupt to propagate to interrupt pin.

- Parameters:
- `interrupts selected_interrupt` - Selected interrupt.
- Returns: None

Valid vales of Selected interrupt parameter :
- `motion_interrupt` - motion interrupt
- `FIFO_overflow_interrupt` - FIFO overflow
- `Fsync_interrupt` - Fsync interrupt
- `raw_rdy_interrupt` - raw_rdy interrupt

------------------

`void disable_interrupt_output(interrupts selected_interrupt)`

Prevent selected interrupt from propagating to interrupt pin.

- Parameters:
- `interrupts selected_interrupt` - Selected interrupt.
- Returns: None

Valid vales of Selected interrupt parameter :
- `motion_interrupt` - motion interrupt
- `FIFO_overflow_interrupt` - FIFO overflow
- `Fsync_interrupt` - Fsync interrupt
- `raw_rdy_interrupt` - raw_rdy interrupt

--------------------

`void clear_interrupt()`

Clear interrupt flags.

- Parameters: None
- Returns: None

-------------------

## Motion interrupt

`void set_motion_threshold_level(uint8_t threshold)`

Set motion interrupt threshold level.

- Parameters:
- `uint8_t threshold` -Tthreshold value of shock that will cause an interrupt.( 4mg per LSB).
- Returns: None

`void enable_motion_interrupt()`

Enable motion interrupt.

- Parameters: None
- Returns: None

------------------

`void disable_motion_interrput()`

Disable motion interrupt.

- Parameters: None
- Returns: None
Loading

0 comments on commit 62813a4

Please sign in to comment.