资源简介
本资源提供了两种不同的程序方法,应用arduino单片机串口读取MPU6050三轴陀螺仪的实时数据;此外还提供了数据的两种应用方向,即使用matlab应用读取到的数据进行模型的实时姿态估计。本程序适用于MPU6050串口读取参考,还适用于将数据应用到模型的姿态估计。内含详细的总结和注释,希望本资源对您有用!
代码片段和文件信息
// I2Cdev library collection - Main I2C device class
// Abstracts bit and byte I2C R/W functions into a convenient class
// 11/1/2011 by Jeff Rowberg
//
// Changelog:
// 2011-11-01 - fix write*Bits mask calculation (thanks sasquatch @ Arduino forums)
// 2011-10-03 - added automatic Arduino version detection for ease of use
// 2011-10-02 - added Gene Knight‘s NBWire TwoWire class implementation with small modifications
// 2011-08-31 - added support for Arduino 1.0 Wire library (methods are different from 0.x)
// 2011-08-03 - added optional timeout parameter to read* methods to easily change from default
// 2011-08-02 - added support for 16-bit registers
// - fixed incorrect Doxygen comments on some methods
// - added timeout value for read operations (thanks mem @ Arduino forums)
// 2011-07-30 - changed read/write function structures to return success or byte counts
// - made all methods static for multi-device memory savings
// 2011-07-28 - initial release
/* ============================================
I2Cdev device library code is placed under the MIT license
Copyright (c) 2011 Jeff Rowberg
Permission is hereby granted free of charge to any person obtaining a copy
of this software and associated documentation files (the “Software“) to deal
in the Software without restriction including without limitation the rights
to use copy modify merge publish distribute sublicense and/or sell
copies of the Software and to permit persons to whom the Software is
furnished to do so subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS“ WITHOUT WARRANTY OF ANY KIND EXPRESS OR
IMPLIED INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM DAMAGES OR OTHER
LIABILITY WHETHER IN AN ACTION OF CONTRACT TORT OR OTHERWISE ARISING FROM
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
===============================================
*/
#include “I2Cdev.h“
#if I2CDEV_IMPLEMENTATION == I2CDEV_BUILTIN_NBWIRE
// NBWire implementation based heavily on code by Gene Knight
// Originally posted on the Arduino forum at http://arduino.cc/forum/index.php/topic70705.0.html
// Originally offered to the i2cdevlib project at http://arduino.cc/forum/index.php/topic68210.30.html
TwoWire Wire;
#endif
/** Default constructor.
*/
I2Cdev::I2Cdev() {
}
/** Read a single bit from an 8-bit device register.
* @param devAddr I2C slave device address
* @param regAddr Register regAddr to read from
* @param bitNum Bit position to read (0-7)
* @param data Container f
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 3438 2011-11-09 14:15 mpu6050-arduino\Arduino\MPU6050\Examples\MPU6050_raw\MPU6050_raw.ino
文件 45051 2012-02-23 09:13 mpu6050-arduino\Arduino\MPU6050\I2Cdev.cpp
文件 11267 2012-02-23 09:09 mpu6050-arduino\Arduino\MPU6050\I2Cdev.h
文件 122085 2011-11-09 14:15 mpu6050-arduino\Arduino\MPU6050\MPU6050.cpp
文件 45436 2011-11-09 14:15 mpu6050-arduino\Arduino\MPU6050\MPU6050.h
文件 463214 2017-12-10 16:14 mpu6050-arduino\Arduino – MPU6050 Getting Ready _.pdf
文件 378 2016-01-05 01:29 mpu6050-arduino\Arduino_MPU6050-master\.gitattributes
文件 574 2016-01-05 01:29 mpu6050-arduino\Arduino_MPU6050-master\.gitignore
文件 373 2016-01-05 01:29 mpu6050-arduino\Arduino_MPU6050-master\Ardu_Sketches\MPU6050_calibration\Calibration.txt
文件 7869 2016-01-05 01:29 mpu6050-arduino\Arduino_MPU6050-master\Ardu_Sketches\MPU6050_calibration\MPU6050_calibration.ino
文件 14649 2016-01-05 01:29 mpu6050-arduino\Arduino_MPU6050-master\Ardu_Sketches\MPU6050_DMP6\MPU6050_DMP6.ino
文件 14649 2016-01-05 01:29 mpu6050-arduino\Arduino_MPU6050-master\Ardu_Sketches\MPU6050_DMP6_Slightly_Modified_4_Matlab\MPU6050_DMP6_Slightly_Modified_4_Matlab.ino
文件 32338 2016-01-05 01:29 mpu6050-arduino\Arduino_MPU6050-master\Ardu_Sketches\MPU6050_Example_Sketc_ba
文件 1614 2016-01-05 01:29 mpu6050-arduino\Arduino_MPU6050-master\Ardu_Sketches\MPU6050_Short_Example_Code\MPU-6050_Short_Example_Code.ino
文件 2058 2016-01-05 01:29 mpu6050-arduino\Arduino_MPU6050-master\Matlab\Functions\Plot_Cube.m
文件 2180 2016-01-05 01:29 mpu6050-arduino\Arduino_MPU6050-master\Matlab\Gyr_00_Read_Data.m
文件 513 2016-01-05 01:29 mpu6050-arduino\Arduino_MPU6050-master\Matlab\Test_Plot_Cube.m
文件 27448 2017-12-10 10:48 mpu6050-arduino\Arduino_MPU6050-master.zip
文件 741047 2017-12-10 10:28 mpu6050-arduino\i2cdevlib-master.zip
文件 1391 2017-12-15 11:46 mpu6050-arduino\mpu6050.txt
文件 5007372 2017-12-10 13:31 mpu6050-arduino\toxiclibs-complete-0020.zip
文件 310981 2017-12-13 18:17 mpu6050-arduino\unti
文件 932 2018-10-22 20:56 mpu6050-arduino\说明.txt
目录 0 2018-10-22 20:14 mpu6050-arduino\Arduino\MPU6050\Examples\MPU6050_raw
目录 0 2018-10-22 20:14 mpu6050-arduino\Arduino\MPU6050\Examples
目录 0 2018-10-22 20:35 mpu6050-arduino\Arduino_MPU6050-master\Ardu_Sketches\MPU6050_calibration
目录 0 2018-10-22 20:35 mpu6050-arduino\Arduino_MPU6050-master\Ardu_Sketches\MPU6050_DMP6
目录 0 2018-10-22 20:35 mpu6050-arduino\Arduino_MPU6050-master\Ardu_Sketches\MPU6050_DMP6_Slightly_Modified_4_Matlab
目录 0 2018-10-22 20:35 mpu6050-arduino\Arduino_MPU6050-master\Ardu_Sketches\MPU6050_Example_Sketc_ba
目录 0 2018-10-22 20:35 mpu6050-arduino\Arduino_MPU6050-master\Ardu_Sketches\MPU6050_Short_Example_Code
............此处省略10个文件信息
评论
共有 条评论