资源简介
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个文件信息
相关资源
- Arduino HMC5883L库文件
- arduino_LiquidCrystal_I2C库及proteus仿真LC
- Arduino_IRremote_master.zip
- Arduino中文手册
- Arduino Mini 资料
- 基于Arduino与LabVIEW的数据采集系统.v
- Arduino通过Ethernet扩展板实现网络远程
- 基于Arduino的-亚博 BST-BATCAR 智能小车底
- Arduino的PID库
- 基于labview和arduinod的超声波测距
- Arduino UNO R3开发板原理图
- 移送气象站 arduino代码
- Arduino Nano v3.0介绍及原理图pdf
- arduino pro mini 封装、pcb图及原理图
- arduino mega 2560 原理图
- 自平衡小车arduino+mpu6050+卡尔曼滤波
- HMC5883L的Arduino库
-
DFPla
yer_Mini_mp3 arduino 库文件 - arduino avrdude 5.11.1 for Windows with JesseJ
- Arduino I2Cdev库
- arduino鼠标点击绝对坐标
- 74LS47驱动7段数码管实验
- usbser.sys和mdmcpq.PNF和mdmcpq.inf还有另一
- 自动计算mpu6050的偏移量MPU6050_calibra
- XLoader hex文件
- arduino-uno-r3 电路图
- 颜色传感器ARDUINO代码
- PS2手柄 - arduino版本例程
- RFID.h RC522
- 适合初学者借鉴的arduino智能小车代码
评论
共有 条评论