-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- refactor API, more in line with other Wire based libs. - update readme.md - added **isConnected()** - added asynchronous interface. - rewrote the synchronous interface. - add examples.
- Loading branch information
1 parent
1204650
commit 62ddc8e
Showing
18 changed files
with
242 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[InternetShortcut] | ||
URL=https://www.sensirion.com/en/download-center/humidity-sensors/humidity-temperature-sensor-sht2x-digital-i2c-accurate/ |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
compile: | ||
# Choosing to run compilation tests on 2 different Arduino platforms | ||
platforms: | ||
- uno | ||
# - due | ||
# - zero | ||
- leonardo | ||
# - m4 | ||
#- esp32 | ||
# - esp8266 | ||
- mega2560 | ||
# - trinket |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// | ||
// FILE: tinySHT2x_demo_async.ino | ||
// AUTHOR: Rob Tillaart | ||
// PURPOSE: demo | ||
// URL: https://github.com/RobTillaart/tinySHT2x | ||
|
||
|
||
#include "Wire.h" | ||
#include "tinySHT2x.h" | ||
|
||
tinySHT2x sht; | ||
|
||
|
||
void setup() | ||
{ | ||
Serial.begin(115200); | ||
Serial.println(__FILE__); | ||
|
||
Wire.begin(); | ||
sht.begin(); | ||
} | ||
|
||
|
||
void loop() | ||
{ | ||
sht.requestTemperature(); | ||
delay(65); // tune to work | ||
Serial.print(sht.readTemperature()); | ||
Serial.print("\t"); | ||
|
||
sht.requestHumidity(); | ||
delay(28); // tune to work | ||
Serial.println(sht.getHumidity()); | ||
delay(1000); | ||
} | ||
|
||
|
||
// -- END OF FILE -- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
compile: | ||
# Choosing to run compilation tests on 2 different Arduino platforms | ||
platforms: | ||
- uno | ||
# - due | ||
# - zero | ||
- leonardo | ||
# - m4 | ||
#- esp32 | ||
# - esp8266 | ||
- mega2560 | ||
# - trinket |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// | ||
// FILE: tinySHT2x_demo_delay.ino | ||
// AUTHOR: Rob Tillaart | ||
// PURPOSE: demo | ||
// URL: https://github.com/RobTillaart/tinySHT2x | ||
|
||
|
||
#include "Wire.h" | ||
#include "tinySHT2x.h" | ||
|
||
tinySHT2x sht; | ||
|
||
|
||
void setup() | ||
{ | ||
Serial.begin(115200); | ||
Serial.println(__FILE__); | ||
|
||
Wire.begin(); | ||
sht.begin(); | ||
} | ||
|
||
|
||
void loop() | ||
{ | ||
Serial.print(sht.getTemperature(65)); // adjust delay if needed | ||
Serial.print("\t"); | ||
Serial.println(sht.getHumidity(28)); // adjust delay if needed | ||
delay(1000); | ||
} | ||
|
||
|
||
// -- END OF FILE -- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.