資源簡介
本資源提供了兩種不同的程序方法,應用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個文件信息
評論
共有 條評論