资源简介
I2C相关库文件
AD7746 Restructure repository to better support multiple platforms 2 years ago
ADS1115 Fix issue when changing MUX or PGA, an invalid result is 9 months ago
ADXL345 Updating I2Cdev class and various devices 5 months ago
AK8975 Updating I2Cdev class and various devices 5 months ago
BMA150 Restructure repository to better support multiple platforms 2 years ago
BMP085 Changed incorrectly-named BMA085 to BMP085 a year ago
DS1307 Restructure repository to better support multiple platforms 2 years ago
HMC5843 Restructure repository to better support multiple platforms 2 years ago
HMC5883L added heading calculation in degrees 9 months ago
I2Cdev Updating I2Cdev.* files for Arduino again 5 months ago
IAQ2000 Restructure repository to better support multiple platforms 2 years ago
ITG3200 Restructure repository to better support multiple platforms 2 years ago
L3G4200D Updated example for consistency 6 months ago
LM73 Added LM73 driver with basic functionality. a year ago
MPR121 Restructure repository to better support multiple platforms 2 years ago
MPU6050 PROGMEM compatibility for ARM Processors 11 days ago
SSD1308 Restructure repository to better support multiple platforms 2 years ago
TCA6424A Restructure repository to better support multiple platforms 2 years ago
_Stub Restructure repository to better support multiple platforms
代码片段和文件信息
// 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 2014-01-21 11:56 i2cdevlib-master\
目录 0 2014-01-21 11:56 i2cdevlib-master\Arduino\
目录 0 2014-01-21 11:56 i2cdevlib-master\Arduino\AD7746\
文件 4365 2014-01-21 11:56 i2cdevlib-master\Arduino\AD7746\AD7746.cpp
文件 7664 2014-01-21 11:56 i2cdevlib-master\Arduino\AD7746\AD7746.h
目录 0 2014-01-21 11:56 i2cdevlib-master\Arduino\ADS1115\
文件 21674 2014-01-21 11:56 i2cdevlib-master\Arduino\ADS1115\ADS1115.cpp
文件 7359 2014-01-21 11:56 i2cdevlib-master\Arduino\ADS1115\ADS1115.h
目录 0 2014-01-21 11:56 i2cdevlib-master\Arduino\ADS1115\Examples\
目录 0 2014-01-21 11:56 i2cdevlib-master\Arduino\ADS1115\Examples\ADS1115_differential\
文件 3565 2014-01-21 11:56 i2cdevlib-master\Arduino\ADS1115\Examples\ADS1115_differential\ADS1115_differential.ino
目录 0 2014-01-21 11:56 i2cdevlib-master\Arduino\ADXL345\
文件 62350 2014-01-21 11:56 i2cdevlib-master\Arduino\ADXL345\ADXL345.cpp
文件 12875 2014-01-21 11:56 i2cdevlib-master\Arduino\ADXL345\ADXL345.h
目录 0 2014-01-21 11:56 i2cdevlib-master\Arduino\ADXL345\Examples\
目录 0 2014-01-21 11:56 i2cdevlib-master\Arduino\ADXL345\Examples\ADXL345_raw\
文件 3129 2014-01-21 11:56 i2cdevlib-master\Arduino\ADXL345\Examples\ADXL345_raw\ADXL345_raw.ino
目录 0 2014-01-21 11:56 i2cdevlib-master\Arduino\AK8975\
文件 5769 2014-01-21 11:56 i2cdevlib-master\Arduino\AK8975\AK8975.cpp
文件 4426 2014-01-21 11:56 i2cdevlib-master\Arduino\AK8975\AK8975.h
目录 0 2014-01-21 11:56 i2cdevlib-master\Arduino\AK8975\Examples\
目录 0 2014-01-21 11:56 i2cdevlib-master\Arduino\AK8975\Examples\AK8975_MPUEVB_heading\
文件 4537 2014-01-21 11:56 i2cdevlib-master\Arduino\AK8975\Examples\AK8975_MPUEVB_heading\AK8975_MPUEVB_heading.ino
目录 0 2014-01-21 11:56 i2cdevlib-master\Arduino\AK8975\Examples\AK8975_MPUEVB_raw\
文件 4246 2014-01-21 11:56 i2cdevlib-master\Arduino\AK8975\Examples\AK8975_MPUEVB_raw\AK8975_MPUEVB_raw.ino
目录 0 2014-01-21 11:56 i2cdevlib-master\Arduino\AK8975\Examples\AK8975_raw\
文件 3173 2014-01-21 11:56 i2cdevlib-master\Arduino\AK8975\Examples\AK8975_raw\AK8975_raw.ino
目录 0 2014-01-21 11:56 i2cdevlib-master\Arduino\BMA150\
文件 16766 2014-01-21 11:56 i2cdevlib-master\Arduino\BMA150\BMA150.cpp
文件 9519 2014-01-21 11:56 i2cdevlib-master\Arduino\BMA150\BMA150.h
目录 0 2014-01-21 11:56 i2cdevlib-master\Arduino\BMA150\examples\
............此处省略97个文件信息
- 上一篇:统计建模历届真题
- 下一篇:基于Multisim数字频率计的设计与仿真
相关资源
- 车牌字符字库 车牌识别字库 车牌字符
- Arduino从入门到精通全课时教程分享
- 密码管理工具源码
- libtiff已编译好的库32位和64位
- STM32 hal库操作ESP8266
- 清明_跨程序辅助类库 v8.1最新版
- CAS-PEAL-R1 人脸数据库
- atmega128 驱动12864不带字库仿真通过
- STMicroelectronics STM32及STM8全系列Altium
- RJ45最全封装集成库AD含市面所有型号
- DDR3-SO-DIMM 封装库 AD Cadece
- glut工具库
- 两个Arduino库-Blynk-BlynkESP8266.zip
- 《数据库系统概论》课后习题答案全
- Altium Desinger_74芯片原理图库
- HCIA-Cloud+4.0题库.pdf
- arduino实验の互动式儿童玩具
- Arduino STM32 平衡小车之家平衡小车源码
- STM32L4_硬件SPI配置_LL库版.rar
- 数据库知识点总结
- FCRA题库.docx
- 国土第三次调查分类图示符号库,A
- Altium DesignerVH3.96接插件封装库,带3
- STM32的USART串口查询方式(库函数)
- Timo_ws2812_control.zip
- 6n137库封装
- 基于arduino的光电鼠标A3050数据读取
- BGA DIP SDIP SOP SSOP TSOP等封装库
- 学校家教服务管理系统(数据库课程
- ArduinoJson
评论
共有 条评论