File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# HTS221
22Arduino library to support the HTS221 capacitive digital sensor for relative humidity and temperature
3+
4+ ## API
5+
6+ This sensor uses I2C to communicate. It is then required to create a TwoWire interface before accessing to the sensors:
7+
8+ dev_i2c = new TwoWire(I2C2_SDA, I2C2_SCL);
9+ dev_i2c->begin();
10+
11+ An instance can be created and enbaled following the procedure below:
12+
13+ For the humidity sensor:
14+
15+ HumTemp = new HTS221Sensor (dev_i2c);
16+ HumTemp->Enable();
17+
18+ The access to the sensor values is done as explained below:
19+
20+ Read humidity and temperature.
21+
22+ HumTemp->GetHumidity(&humidity);
23+ HumTemp->GetTemperature(&temperature);
24+
25+ ## Documentation
26+
27+ You can find the source files at
28+ https://github.com/stm32duino/HTS221
29+
30+ The HTS221 datasheet is available at
31+ http://www.st.com/content/st_com/en/products/mems-and-sensors/humidity-sensors/hts221.html
You can’t perform that action at this time.
0 commit comments