资源简介
基因arduino的平衡小车代码,使用MPU6050获取原始数据,使用三角函数和卡尔曼滤波获取姿态,使用PID算法计算电机PWM。

代码片段和文件信息
// 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 for single bit value
* @param timeout Optional read timeout
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2016-01-06 17:22 BalanceCar\
文件 6942 2016-01-05 12:08 BalanceCar\BalanceCar.ino
文件 3276 2016-01-05 10:39 BalanceCar\BalanceCar.vcxproj
文件 823 2016-01-05 10:39 BalanceCar\BalanceCar.vcxproj.filters
目录 0 2016-01-06 17:22 BalanceCar\MPU6050\
文件 39916 2011-11-09 21:15 BalanceCar\MPU6050\I2Cdev.cpp
文件 9792 2011-11-09 21:15 BalanceCar\MPU6050\I2Cdev.h
文件 122085 2011-11-09 21:15 BalanceCar\MPU6050\MPU6050.cpp
文件 45436 2011-11-09 21:15 BalanceCar\MPU6050\MPU6050.h
目录 0 2016-01-06 17:22 BalanceCar\__vm\
文件 2772 2016-01-05 10:39 BalanceCar\__vm\.BalanceCar.vsarduino.h
- 上一篇:MT4软件 MACD双线指标
- 下一篇:基于AD9850的信号发生器的设计与实现
相关资源
- 最简单的平衡小车
- 基于K60的线性CCD摄像头的自主循迹平
- 平衡小车之家全套资料
- 平衡小车之家资料.zip
- 平衡小车之家原版资料
- 基于GA的两轮自平衡小车LQR最优控制器
- 两轮平衡车源程序,方能仪器,自平
- 基于stm32F103的两轮自平衡小车
- 51单片机两轮自平衡小车全套设计方案
- 自平衡小车源代码亲测有问题可随时
- 基于TMS320F28069智能平衡车平衡小车基
- STM32平衡小车程序
- 自己写的,平衡小车代码,亲测有效
- 基于STM32平衡小车制作
- 平衡小车PCB+代码+原理图
- 两轮平衡小车K5环境+STM32+MPU6050+卡尔曼
- 两轮自平衡小车控制系统
- Arduino平衡小车说明书.rar
- 平衡小车蓝牙控制Apk 3个
- 平衡小车car--葛凤佩.rar
- 平衡小车原理图PCB图
- 平衡小车pcb与原理图,源码,蓝牙,
- 基于STM32的两轮平衡小车资料
- 平衡小车 SCH+PCB+程序
- 两轮自平衡小车全套资料
- 论文研究-两轮自平衡小车模型参考自
- stc15两轮自平衡小车
- 基于STC12C5A60S2两轮平衡小车程序源码
- Arduino STM32 平衡小车之家平衡小车源码
- 自平衡小车arduino+mpu6050+卡尔曼滤波
评论
共有 条评论