Giter VIP home page Giter VIP logo

mpu-6xxx's Introduction

mpu6xxx

中文页 | English

Introduction

This software package is a universal sensor driver package for InvenSense's six-axis series sensors, compatible with mpu6000, mpu6050, mpu6500, mpu9250, icm20608 and other sensors. And the new version of this software package has been connected to the Sensor framework, through the Sensor framework, developers can quickly drive this sensor. To view the README of the old version of the package, please click here.

Support

Contains equipment Accelerometer Gyroscope Magnetometer
Communication Interface
IIC
SPI
Work Mode
Polling
Interruption
FIFO
Power Mode
Power down
Low power consumption
Normal
High power consumption
Data output rate
Measuring Range
Self-check
Multi-instance

Instructions for use

Dependence

  • RT-Thread 4.0.0+
  • Sensor component
  • IIC/SPI driver: mpu6xxx devices use IIC/SPI for data communication, and need system IIC/SPI driver support;

Get the package

To use the MPU6xxx software package, you need to select it in the RT-Thread package management. The specific path is as follows:

RT-Thread online packages  --->
  peripheral libraries and drivers  --->
    sensors drivers  --->
      mpu6xxx: Universal 6-axis sensor driver package,support: accelerometer, gyroscope.
              Version (latest)  --->
        [*]   Enable mpu6xxx acce
        [*]   Enable mpu6xxx gyro
        [*]   Enable mpu6xxx mag

Enable MPU6xxx acce: Configure to enable the accelerometer function

Enable MPU6xxx gyro: Configure to turn on the gyroscope function

Enable MPU6xxx mag: Configure to turn on the Magnetometer function

Version: software package version selection

Using packages

The initialization function of MPU6xxx software package is as follows:

int rt_hw_mpu6xxx_init(const char *name, struct rt_sensor_config *cfg);

This function needs to be called by the user. The main functions of the function are:

  • Device configuration and initialization (configure interface devices and interrupt pins according to the incoming configuration information);
  • Register the corresponding sensor device and complete the registration of the MPU6xxx device;

Initialization example

#include "sensor_inven_mpu6xxx.h"

int rt_hw_mpu6xxx_port(void)
{
    struct rt_sensor_config cfg;
    
    cfg.intf.dev_name = "i2c1";
    cfg.intf.user_data = (void *)MPU6XXX_ADDR_DEFAULT;
    cfg.irq_pin.pin = RT_PIN_NONE;

    rt_hw_mpu6xxx_init("mpu", &cfg);
    return 0;
}
INIT_APP_EXPORT(rt_hw_mpu6xxx_port);

Precautions

No

contact information

Maintenance man:

mpu-6xxx's People

Contributors

guozhanxin avatar sogwms avatar armink avatar scratch-er avatar yqiu2018 avatar yangjie11 avatar

Stargazers

XYC avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.