Skip to content

Commit

Permalink
change for library manager
Browse files Browse the repository at this point in the history
  • Loading branch information
HidekiYamauchi committed Apr 21, 2016
1 parent c209839 commit 295b23d
Show file tree
Hide file tree
Showing 8 changed files with 710 additions and 363 deletions.
22 changes: 12 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
# FaBo9AXIS-MPU9250-Library

# FaBo9Axis
This is a library for FaBo #202 9Axis I2C Brick.

This is a library for FaBo 9Aixs Brick.
## FaBo 9Axis I2C Brick

# MPU9250
[#208 Humidity I2C Brick](http://fabo.io/208.html)

MPU9250 is 9axis sensor.
## MPU-9250

# Datasheet
MPU9250 is 9-Axis sensor.

[MPU9250 Datasheet](http://store.invensense.com/datasheets/invensense/MPU9250REV1.0.pdf)
### MPU-9250 Datasheet

[MPU9250 Datasheet](http://43zrtwysvxb2gf29r5o0athu.wpengine.netdna-cdn.com/wp-content/uploads/2015/02/MPU-9250-Datasheet.pdf)
[MPU9250 Register map](http://43zrtwysvxb2gf29r5o0athu.wpengine.netdna-cdn.com/wp-content/uploads/2015/02/MPU-9250-Register-Map.pdf)

# Releases
## Releases

1.0.0 Initial release.
- 1.0.0 Initial release.

# How to install.
## How to install.

[Installing Additional Arduino Libraries](https://www.arduino.cc/en/Guide/Libraries#toc3)
[Installing Additional Arduino Libraries](https://www.arduino.cc/en/Guide/Libraries)
49 changes: 32 additions & 17 deletions examples/read9axis/read9axis.ino
Original file line number Diff line number Diff line change
@@ -1,31 +1,46 @@
#include "fabo-mpu9250.h"
#include "Wire.h"
/**
@file read9axis.ino
@brief This is an Example for the FaBo 9Axis I2C Brick.
FaBo9Axis fabo9axis;
http://fabo.io/202.html
Released under APACHE LICENSE, VERSION 2.0
http://www.apache.org/licenses/
@author FaBo<[email protected]>
*/

#include <Wire.h>
#include <FaBo9Axis_MPU9250.h>

FaBo9Axis fabo_9axis;

void setup() {
Serial.begin(9600);
// デバイス初期化
Serial.println("Checking I2C device...");
if (fabo9axis.searchDevice()) {
Serial.println("I am MPU9250");
fabo9axis.configuration();
Serial.println("RESET");
Serial.println();

Serial.println("configuring device.");

if (fabo_9axis.begin()) {
Serial.println("configured FaBo 9Axis I2C Brick");
} else {
Serial.println("device error");
while(1);
}
}

void loop() {
int ax, ay, az;
int gx, gy, gz;
int mx, my, mz;
uint16_t temp;
fabo9axis.readAccelXYZ(&ax, &ay, &az);
fabo9axis.readGyroXYZ(&gx, &gy, &gz);
fabo9axis.readMagnetXYZ(&mx, &my, &mz);
temp = fabo9axis.readTemperature();
float ax,ay,az;
float gx,gy,gz;
float mx,my,mz;
float temp;

fabo_9axis.readAccelXYZ(&ax,&ay,&az);
fabo_9axis.readGyroXYZ(&gx,&gy,&gz);
fabo_9axis.readMagnetXYZ(&mx,&my,&mz);
fabo_9axis.readTemperature(&temp);

Serial.print("ax: ");
Serial.print(ax);
Expand Down
167 changes: 167 additions & 0 deletions keywords.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
#######################################
# Syntax Coloring Map For FaBo9AXIS-MPU9250-Library
#######################################

#######################################
# Class (KEYWORD1)
#######################################

FaBo9Axis KEYWORD1

#######################################
# Methods and Functions (KEYWORD2)
#######################################

begin KEYWORD2
searchDevice KEYWORD2
configMPU9250 KEYWORD2
configAK8963 KEYWORD2
checkDataReady KEYWORD2
readAccelXYZ KEYWORD2
readGyroXYZ KEYWORD2
readMagnetXYZ KEYWORD2
readTemperature KEYWORD2

#######################################
# Constants (LITERAL1)
#######################################

MPU9250_SLAVE_ADDRESS LITERAL1
AK8963_SLAVE_ADDRESS LITERAL1
MPU9250_SELF_TEST_X_GYRO LITERAL1
MPU9250_SELF_TEST_Y_GYRO LITERAL1
MPU9250_SELF_TEST_Z_GYRO LITERAL1
MPU9250_SELF_TEST_X_ACCEL LITERAL1
MPU9250_SELF_TEST_Y_ACCEL LITERAL1
MPU9250_SELF_TEST_Z_ACCEL LITERAL1
MPU9250_XG_OFFSET_H LITERAL1
MPU9250_XG_OFFSET_L LITERAL1
MPU9250_YG_OFFSET_H LITERAL1
MPU9250_YG_OFFSET_L LITERAL1
MPU9250_ZG_OFFSET_H LITERAL1
MPU9250_ZG_OFFSET_L LITERAL1
MPU9250_SMPLRT_DIV LITERAL1
MPU9250_CONFIG LITERAL1
MPU9250_GYRO_CONFIG LITERAL1
MPU9250_ACCEL_CONFIG LITERAL1
MPU9250_ACCEL_CONFIG_2 LITERAL1
MPU9250_LP_ACCEL_ODR LITERAL1
MPU9250_WOM_THR LITERAL1
MPU9250_FIFO_EN LITERAL1
MPU9250_I2C_MST_CTRL LITERAL1
MPU9250_I2C_SLV0_ADDR LITERAL1
MPU9250_I2C_SLV0_REG LITERAL1
MPU9250_I2C_SLV0_CTRL LITERAL1
MPU9250_I2C_SLV1_ADDR LITERAL1
MPU9250_I2C_SLV1_REG LITERAL1
MPU9250_I2C_SLV1_CTRL LITERAL1
MPU9250_I2C_SLV2_ADDR LITERAL1
MPU9250_I2C_SLV2_REG LITERAL1
MPU9250_I2C_SLV2_CTRL LITERAL1
MPU9250_I2C_SLV3_ADDR LITERAL1
MPU9250_I2C_SLV3_REG LITERAL1
MPU9250_I2C_SLV3_CTRL LITERAL1
MPU9250_I2C_SLV4_ADDR LITERAL1
MPU9250_I2C_SLV4_REG LITERAL1
MPU9250_I2C_SLV4_DO LITERAL1
MPU9250_I2C_SLV4_CTRL LITERAL1
MPU9250_I2C_SLV4_DI LITERAL1
MPU9250_I2C_MST_STATUS LITERAL1
MPU9250_INT_PIN_CFG LITERAL1
MPU9250_INT_ENABLE LITERAL1
MPU9250_INT_STATUS LITERAL1
MPU9250_ACCEL_XOUT_H LITERAL1
MPU9250_ACCEL_XOUT_L LITERAL1
MPU9250_ACCEL_YOUT_H LITERAL1
MPU9250_ACCEL_YOUT_L LITERAL1
MPU9250_ACCEL_ZOUT_H LITERAL1
MPU9250_ACCEL_ZOUT_L LITERAL1
MPU9250_TEMP_OUT_H LITERAL1
MPU9250_TEMP_OUT_L LITERAL1
MPU9250_GYRO_XOUT_H LITERAL1
MPU9250_GYRO_XOUT_L LITERAL1
MPU9250_GYRO_YOUT_H LITERAL1
MPU9250_GYRO_YOUT_L LITERAL1
MPU9250_GYRO_ZOUT_H LITERAL1
MPU9250_GYRO_ZOUT_L LITERAL1
MPU9250_EXT_SENS_DATA_00 LITERAL1
MPU9250_EXT_SENS_DATA_01 LITERAL1
MPU9250_EXT_SENS_DATA_02 LITERAL1
MPU9250_EXT_SENS_DATA_03 LITERAL1
MPU9250_EXT_SENS_DATA_04 LITERAL1
MPU9250_EXT_SENS_DATA_05 LITERAL1
MPU9250_EXT_SENS_DATA_06 LITERAL1
MPU9250_EXT_SENS_DATA_07 LITERAL1
MPU9250_EXT_SENS_DATA_08 LITERAL1
MPU9250_EXT_SENS_DATA_09 LITERAL1
MPU9250_EXT_SENS_DATA_10 LITERAL1
MPU9250_EXT_SENS_DATA_11 LITERAL1
MPU9250_EXT_SENS_DATA_12 LITERAL1
MPU9250_EXT_SENS_DATA_13 LITERAL1
MPU9250_EXT_SENS_DATA_14 LITERAL1
MPU9250_EXT_SENS_DATA_15 LITERAL1
MPU9250_EXT_SENS_DATA_16 LITERAL1
MPU9250_EXT_SENS_DATA_17 LITERAL1
MPU9250_EXT_SENS_DATA_18 LITERAL1
MPU9250_EXT_SENS_DATA_19 LITERAL1
MPU9250_EXT_SENS_DATA_20 LITERAL1
MPU9250_EXT_SENS_DATA_21 LITERAL1
MPU9250_EXT_SENS_DATA_22 LITERAL1
MPU9250_EXT_SENS_DATA_23 LITERAL1
MPU9250_I2C_SLV0_DO LITERAL1
MPU9250_I2C_SLV1_DO LITERAL1
MPU9250_I2C_SLV2_DO LITERAL1
MPU9250_I2C_SLV3_DO LITERAL1
MPU9250_I2C_MST_DELAY_CTRL LITERAL1
MPU9250_SIGNAL_PATH_RESET LITERAL1
MPU9250_MOT_DETECT_CTRL LITERAL1
MPU9250_USER_CTRL LITERAL1
MPU9250_PWR_MGMT_1 LITERAL1
MPU9250_PWR_MGMT_2 LITERAL1
MPU9250_FIFO_COUNTH LITERAL1
MPU9250_FIFO_COUNTL LITERAL1
MPU9250_FIFO_R_W LITERAL1
MPU9250_WHO_AM_I LITERAL1
MPU9250_XA_OFFSET_H LITERAL1
MPU9250_XA_OFFSET_L LITERAL1
MPU9250_YA_OFFSET_H LITERAL1
MPU9250_YA_OFFSET_L LITERAL1
MPU9250_ZA_OFFSET_H LITERAL1
MPU9250_ZA_OFFSET_L LITERAL1
MPU9250_GFS_250 LITERAL1
MPU9250_GFS_500 LITERAL1
MPU9250_GFS_1000 LITERAL1
MPU9250_GFS_2000 LITERAL1
MPU9250_AFS_2G LITERAL1
MPU9250_AFS_4G LITERAL1
MPU9250_AFS_8G LITERAL1
MPU9250_AFS_16G LITERAL1
AK8963_WIA LITERAL1
AK8963_INFO LITERAL1
AK8963_ST1 LITERAL1
AK8963_HXL LITERAL1
AK8963_HXH LITERAL1
AK8963_HYL LITERAL1
AK8963_HYH LITERAL1
AK8963_HZL LITERAL1
AK8963_HZH LITERAL1
AK8963_ST2 LITERAL1
AK8963_CNTL1 LITERAL1
AK8963_CNTL2 LITERAL1
AK8963_ASTC LITERAL1
AK8963_TS1 LITERAL1
AK8963_TS2 LITERAL1
AK8963_I2CDIS LITERAL1
AK8963_ASAX LITERAL1
AK8963_ASAY LITERAL1
AK8963_ASAZ LITERAL1
AK8963_RSV LITERAL1
AK8963_MODE_DOWN LITERAL1
AK8963_MODE_ONE LITERAL1
AK8963_MODE_C8HZ LITERAL1
AK8963_MODE_C100HZ LITERAL1
AK8963_MODE_TRIG LITERAL1
AK8963_MODE_TEST LITERAL1
AK8963_MODE_FUSE LITERAL1
AK8963_BIT_14 LITERAL1
AK8963_BIT_16 LITERAL1
12 changes: 6 additions & 6 deletions library.properties
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name=FaBo9AXIS-MPU9250-Library
version=1.0
author=Akira Sasaki<akira@fabo.io>
name=FaBo 202 9Axis MPU9250
version=1.0.0
author=FaBo<info@fabo.io>
maintainer=Akira Sasaki<[email protected]>
sentence=A library for MPU9250 that getting values of 9axis.
paragraph=MPU9250 is 9axis sensors.
sentence=A library for FaBo 9Axis I2C Brick
paragraph=MPU9250 is 9-Axis sensor.
category=Sensors
url=https://github.com/FaBoPlatform/FaBo9AXIS-MPU9250-Library
architectures=*
architectures=avr
Loading

0 comments on commit 295b23d

Please sign in to comment.