HTU21D (community library)
Summary
Name | Value |
---|---|
Name | HTU21D |
Version | 0.1.0 |
Installs | |
License | GPL v3 |
Author | Romain MP romain.mp@gmail.com |
URL | https://github.com/romainmp/HTU21D |
Repository | https://github.com/romainmp/HTU21D.git |
Download | .tar.gz |
All Versions | 0.1.0, 0.0.2, 0.0.1 |
Library to support HTU21D Humidity & Temperature sensor
Example Build Testing
Device OS Version:
This table is generated from an automated build. Success only indicates that the code compiled successfully.
Library Read Me
This content is provided by the library maintainer and has not been validated or approved.
HTU21D
A Library to add support of HTU21D temperature and humidity sensor to Particle core (Formerly Spark Core).
Usage
Before your setup function
#include "HTU21D.h"
HTU21D htu = HTU21D();
In your setup function
// HT21D sensor setup
while(! htu.begin()){
Serial.println("Couldnt find HTU21D");
delay(1000);
}
In your loop you can now get values like that
temperature = htu.readTemperature();
humidity = htu.readHumidity();
Options
Resolution
The sensor offers 2 configurations: Maximum resolution : 12bits resolution for Relative humidity and 14bits for temperature or 11bit resolution for both temperature and relative humidity
// Set maximum resolution
htu.setResolution(HTU21D_RES_MAX);
// Set 11bits resolution
htu.setResolution(HTU21D_RES_11BITS);
Contributing
- Fork it (https://github.com/romainmp/HTU21D/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Browse Library Files