-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add DHT20_ERROR_BYTES_ALL_ZERO error message and more (#5)
* fix #4 DHT20_ERROR_BYTES_ALL_ZERO error condition. * fix keywords * add readStatus() fix _readStatus() * add setWireTimeout(250000, true); // in comments
- Loading branch information
1 parent
8081424
commit 6232655
Showing
11 changed files
with
113 additions
and
26 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
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,47 @@ | ||
// | ||
// FILE: DHT20_read_status.ino | ||
// AUTHOR: Rob Tillaart | ||
// PURPOSE: Demo for DHT20 I2C humidity & temperature sensor | ||
// | ||
|
||
// Always check datasheet - front view | ||
// | ||
// +--------------+ | ||
// VDD ----| 1 | | ||
// SDA ----| 2 DHT20 | | ||
// GND ----| 3 | | ||
// SCL ----| 4 | | ||
// +--------------+ | ||
|
||
|
||
#include "DHT20.h" | ||
|
||
DHT20 DHT; | ||
|
||
uint8_t count = 0; | ||
|
||
void setup() | ||
{ | ||
DHT.begin(); // ESP32 default pins 21 22 | ||
|
||
Wire.setClock(400000); | ||
|
||
Serial.begin(115200); | ||
Serial.println(__FILE__); | ||
Serial.print("DHT20 LIBRARY VERSION: "); | ||
Serial.println(DHT20_LIB_VERSION); | ||
Serial.println(); | ||
|
||
delay(2000); | ||
} | ||
|
||
|
||
void loop() | ||
{ | ||
int status = DHT.readStatus(); | ||
Serial.println(status); | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
name=DHT20 | ||
version=0.1.1 | ||
version=0.1.2 | ||
author=Rob Tillaart <[email protected]> | ||
maintainer=Rob Tillaart <[email protected]> | ||
sentence=Arduino library for I2C DHT20 temperature and humidity sensor. | ||
|
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