资源简介
arduino多种器件库,扩展硬件,包括MPU6050在内等

代码片段和文件信息
// I2Cdev library collection - AD7746 I2C device class
// based on Analog Devices AD7746 Datasheet Revision 0 2005
// 2012-04-01 by Peteris Skorovs
//
// This I2C device library is using (and submitted as a part of) Jeff Rowberg‘s I2Cdevlib library
// which should (hopefully) always be available at https://github.com/jrowberg/i2cdevlib
//
// Changelog:
// 2012-04-01 - initial release
/* ============================================
I2Cdev device library code is placed under the MIT license
Copyright (c) 2012 Peteris Skorovs
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 “AD7746.h“
/** Default constructor uses default I2C address.
* @see AD7746_DEFAULT_ADDRESS
*/
AD7746::AD7746() {
devAddr = AD7746_DEFAULT_ADDRESS;
}
/** Specific address constructor.
* @param address I2C address
* @see AD7746_DEFAULT_ADDRESS
* @see AD7746_ADDRESS
*/
AD7746::AD7746(uint8_t address) {
devAddr = address;
}
/** Power on and prepare for general usage.
*/
void AD7746::initialize() {
reset();
}
/** Verify the I2C connection.
* Make sure the device is connected and responds as expected.
* @return True if connection is valid false otherwise
*/
bool AD7746::testConnection() {
if (I2Cdev::readByte(devAddr AD7746_RA_STATUS buffer)) {
return true;
}
return false;
}
void AD7746::reset() {
#ifdef I2CDEV_SERIAL_DEBUG
Serial.print(“I2C (0x“);
Serial.print(devAddr HEX);
Serial.print(“) resetting“);
Serial.print(“...“);
#endif
#if ((I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE && ARDUINO < 100) || I2CDEV_IMPLEMENTATION == I2CDEV_BUILTIN_NBWIRE)
Wire.beginTransmission(devAddr);
Wire.send((uint8_t) AD7746_RESET); // send reset
#elif (I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE && ARDUINO >= 100)
Wire.beginTransmission(devAddr);
Wire.write((uint8_t) AD7746_RESET)
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2013-01-18 05:30 Arduino\
目录 0 2013-01-18 05:30 Arduino\AD7746\
文件 4365 2012-12-15 12:06 Arduino\AD7746\AD7746.cpp
文件 7664 2012-12-15 12:06 Arduino\AD7746\AD7746.h
目录 0 2013-01-18 05:30 Arduino\ADS1115\
文件 20387 2012-12-15 12:06 Arduino\ADS1115\ADS1115.cpp
文件 6700 2012-12-15 12:06 Arduino\ADS1115\ADS1115.h
目录 0 2013-01-18 05:30 Arduino\ADXL345\
文件 62338 2012-12-15 12:06 Arduino\ADXL345\ADXL345.cpp
文件 12875 2012-12-15 12:06 Arduino\ADXL345\ADXL345.h
目录 0 2013-01-18 05:30 Arduino\ADXL345\Examples\
目录 0 2013-01-18 05:30 Arduino\ADXL345\Examples\ADXL345_raw\
文件 3129 2012-12-15 12:06 Arduino\ADXL345\Examples\ADXL345_raw\ADXL345_raw.ino
目录 0 2013-01-18 05:30 Arduino\AK8975\
文件 5769 2012-12-15 12:06 Arduino\AK8975\AK8975.cpp
文件 4426 2012-12-15 12:06 Arduino\AK8975\AK8975.h
目录 0 2013-01-18 05:30 Arduino\AK8975\Examples\
目录 0 2013-01-18 05:30 Arduino\AK8975\Examples\AK8975_MPUEVB_heading\
文件 4529 2012-12-15 12:06 Arduino\AK8975\Examples\AK8975_MPUEVB_heading\AK8975_MPUEVB_heading.ino
目录 0 2013-01-18 05:30 Arduino\AK8975\Examples\AK8975_MPUEVB_raw\
文件 4246 2012-12-15 12:06 Arduino\AK8975\Examples\AK8975_MPUEVB_raw\AK8975_MPUEVB_raw.ino
目录 0 2013-01-18 05:30 Arduino\AK8975\Examples\AK8975_raw\
文件 3173 2012-12-15 12:06 Arduino\AK8975\Examples\AK8975_raw\AK8975_raw.ino
目录 0 2013-01-18 05:30 Arduino\BMA150\
文件 16766 2012-12-15 12:06 Arduino\BMA150\BMA150.cpp
文件 9519 2012-12-15 12:06 Arduino\BMA150\BMA150.h
目录 0 2013-01-18 05:30 Arduino\BMA150\examples\
目录 0 2013-01-18 05:30 Arduino\BMA150\examples\BMA150_raw\
文件 2964 2012-12-15 12:06 Arduino\BMA150\examples\BMA150_raw\BMA150_raw.ino
目录 0 2013-01-18 05:30 Arduino\BMP085\
文件 9047 2012-12-15 12:06 Arduino\BMP085\BMP085.cpp
............此处省略69个文件信息
相关资源
- ADNS-3080光流传感器测试程序Arduino
- EESkill NRF24L01 无线模块用户手册
- Arduino nano 工程文件
- Arduino教程 Lesson 之--自制风扇
- 基于Arduino的智能环境监控系统设计
- 基于Arduino和Machtalk的温棚环境监测系
- arduino pca9685多舵机同时控制案例
- arduino技术内幕
- Arduino电子设计实战指南.零基础篇_超
- 物联网智能家居平台DIY:ARDUINO 物联网
- 实验1.zip arduino跑马灯led灯实验,串口
- opencat所有资料.zip
- arduino主机,stm8从机。I2C测试 。每次
- DS18B20_Serial_println.ino
- ps2手柄arduino库文件
- 基于手机蓝牙的arduino遥控小车
- arduino中的can库函数
- 密码+指纹锁资料包.rar
- 贝壳物联arduino esp8266 demo版本
- HMC5883L罗盘指南针模块库文件及中英文
- arduino 小贱钟源码及教程
- Atom-TMC2208Pilot在Arduino上运行的应用程
- 写字机制作方案
- PID-增量式PID和位置式PID算法实现和
- Building Wireless Sensor Networks Using Arduin
- vc控制Arduino,实现串口通信
- Arduino入门经典
- Arduino所有库.zip
- 基于STM32和arduino的MPU9250九轴传感器代
- GY-9960模块Keil 和Arduino驱动程序
评论
共有 条评论