Texas Instruments HDC2010 Arduino Library
==========================================
Description:
The HDC2010 Library for Arduino allows for configuration and use of
the HDC2010 without the need to use I2C or know the register mapping of
the device.
Feel free to modify and reuse this library as you see fit. This code is
released AS-IS into the public domain. No guarantee or warranty is given.
This code will not be supported by Texas Instruments after release.
---------------------------------------------------------------------------------------
Installation:
Extract or copy the HDC2010 Arduino Library folder into the 'libraries'
folder found in your Arduino Sketchbook. The example sketch will then
be available under 'custom libraries' when you select File-> Examples.
---------------------------------------------------------------------------------------
Contents:
HDC2010.cpp - C++ File defining behavior of HDC2010 methods
HDC2010.h - Header file for HDC2010.cpp
keywords.txt - Keywords from HDC2010.h
library.properties - Properties file for HDC2010 library
Examples - Holds HDC2010 example sketch
----------------------------------------------------------------------------------------
Library Functions:
HDC2010(uint8_t addr)
- Initializes an HDC2010 object
void begin(void)
- Equivalent to wire.Begin(), Joins I2C Bus
float readTemp(void)
- Returns the temperature in degrees C
float readHumidity(void)
- Returns the relative humidity
void enableHeater(void)
- Enables the heating element
void disableHeater(void)
- Disables the heating element
void setLowTemp(float temp)
- Sets the lower temperature threshold (in celcius). Temperature may not
be exact due to 8 bit quantization.
void setHighTemp(float temp)
- Sets the upper temperature threshold (in celcius). Temperature may not
be exact due to 8 bit quantization.
void setHighHumidity(float humid)
- Sets the upper humidity threshold (as a %). Humidity may not
be exact due to 8 bit quantization.
void setLowHumidity(float humid)
- Sets the lower humidity threshold (as a %). Humidity may not
be exact due to 8 bit quantization.
float readLowHumidityThreshold(void)
- Returns contents of low humidity threshold register
float readHighHumidityThreshold(void)
- Returns contents of high humidity threshold register
float readLowTempThreshold(void)
- Returns contents of low temperature threshold register (in C)
float readHighTempThreshold(void)
- Returns contents of high temperature threshold register (in C)
void triggerMeasurement(void)
- Triggers a manual temperature/humidity reading. Use to start
the taking of regular measurements.
void reset(void)
- Triggers a software reset, all registers are returned to default values
void enableInterrupt(void)
- Enables the interrupt/DRDY pin
void disableInterrupt(void)
- Disables the interrupt/DRDY pin (High Z)
uint8_t readInterruptStatus(void)
- Reads the status of the interrupt register. The results can be interpreted
to know which interrupts have been generated. The HDC2010 datasheet explains
the contents of this register.
void clearMaxTemp(void)
- Clears the Maximum temperature register.
void clearMaxHumidity(void)
- Clears the Maximum humidity register
float readMaxTemp(void)
- Reads the maximum temperature register
float readMaxHumidity(void)
- Reads the maximum humidity register
void enableThresholdInterrupt(void)
- Enables high and low temperature/humidity interrupts
void disableThresholdInterrupt(void)
- Disables high and low temperature/humidity interrupts
void enableDRDYInterrupt(void)
- Enables data ready interrupt
void disableDRDYInterrupt(void)
- Disables data ready interrupt
void setTempRes(int resolution)
void setHumidRes(int resolution)
Sets Temperature & Humidity Resolution, 3 options
0 - 14 bit
1 - 11 bit
2 - 9 bit
default - 14 bit
void setMeasurementMode(int mode)
Sets measurement mode, 3 options
0 - Temperature and Humidity
1 - Temperature only
2 - Humidity only
default - Temperature & Humidity
void setRate(int rate)
Sets reading rate, 8 options
0 - Manual
1 - reading every 2 minutes
2 - reading every minute
3 - reading every ten seconds
4 - reading every 5 seconds
5 - reading every second
6 - reading at 2Hz
7 - reading at 5Hz
default - Manual
void setInterruptPolarity(int polarity)
Sets Interrupt polarity, 2 options
0 - Active Low
1 - Active High
default - Active Low
void setInterruptMode(int polarity)
Sets Interrupt mode, 2 options
0 - Level sensitive
1 - Comparator mode
default - Level sensitive
yc-my
- 粉丝: 2
- 资源: 5
最新资源
- 信捷XC PLC与力士乐VFC-x610变频器通讯程序原创可直接用于生产的程序,程序带注释,并附送触摸屏程序,有接线方式和设置,通讯地址说明等 程序采用轮询,可靠稳定 器件:信捷XC3的PLC,博世
- CMIP6 变量详细表格
- KF2EDGK系列5.08接线端子,带3D封装
- 信捷XC PLC与3台力士乐VFC-x610变频器通讯通讯 原创可直接用于生产的程序,程序带注释,并附送触摸屏程序,有接线方式和设置,通讯地址说明等 程序采用轮询,可靠稳定 器件:信捷XC3的PLC
- org.xmind.ui.mindmap-3.6.1.jar
- 16台搅拌机定时控制程序16台搅拌机定时控制,使用三菱FX系列PLC,威伦通触摸屏,具备完善的控制功能
- 微网双层优化模型matlab 采用yalmip编写三个微网的分层优化模型,考虑电价的负荷响应,综合配电网运营商收益和用户购电成本,程序运行稳定
- rv1126交叉编译工具链gcc-arm-8.3-2019.02-x86-64-arm-linux-gnueabihf.tar.xz和安装步骤
- 1960-2023年世界各国国民总收入数据
- 风储深度调峰模型matlab 考虑风储的调峰模型,采用cplex作为求解器,实现不同主体出力优化控制,程序运行稳定,有参考资料,
- 计算机系统安全性与性能评估:IOMMU在Linux环境下的性能研究及其优化策略
- 电动汽车蒙特卡洛分析matlab 通过matlab程序编写电动汽车蒙特卡洛模型,得到汽车行驶里程的概率分布曲线和充电功率曲线,程序运行可靠,有参考资料
- 考虑交通流量的电动汽车充电站规划matlab 程序采用matlab编制,采用粒子群算法,结合交通网络流量,得到最终充电站规划方案,程序运行可靠
- rustdesk-1.3.6-x86-64.msi
- 电动汽车优化模型matlab 狼群算法
- 你还在为伺服驱动器 FPGA架构苦恼吗,本方案FPGA代码实现电流环 速度环 位置环 SVPWM 坐标变 测速 分频 滤波器等,程序方便移植不同的平台,具有很高的研究价值
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈