-
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- fix #104, add support for KY015 (again) - minor edits examples - add **DHT_endless_debug.ino** develop example
- Loading branch information
1 parent
973e7c7
commit b660430
Showing
10 changed files
with
118 additions
and
11 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,28 @@ | ||
platforms: | ||
rpipico: | ||
board: rp2040:rp2040:rpipico | ||
package: rp2040:rp2040 | ||
gcc: | ||
features: | ||
defines: | ||
- ARDUINO_ARCH_RP2040 | ||
warnings: | ||
flags: | ||
|
||
packages: | ||
rp2040:rp2040: | ||
url: https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json | ||
|
||
compile: | ||
# Choosing to run compilation tests on 2 different Arduino platforms | ||
platforms: | ||
# - uno | ||
# - due | ||
# - zero | ||
# - leonardo | ||
# - m4 | ||
# - esp32 | ||
# - esp8266 | ||
# - mega2560 | ||
# - rpipico | ||
|
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,70 @@ | ||
// | ||
// FILE: DHT_endless_debug.ino | ||
// AUTHOR: Rob Tillaart | ||
// PURPOSE: demo | ||
// DATE: 2020-06-04 | ||
// (c) : MIT | ||
|
||
// make _bits public + disable CRC check to run this program. | ||
|
||
|
||
// DHT PIN layout from left to right | ||
// ================================= | ||
// FRONT : DESCRIPTION | ||
// pin 1 : VCC | ||
// pin 2 : DATA | ||
// pin 3 : Not Connected | ||
// pin 4 : GND | ||
|
||
|
||
#include <dhtnew.h> | ||
|
||
DHTNEW dht(5); // ESP 16 UNO 5 MKR1010 5 | ||
|
||
uint32_t count = 0; | ||
uint32_t start, stop; | ||
|
||
uint32_t errors[11] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; | ||
|
||
|
||
void setup() | ||
{ | ||
while (!Serial); // MKR1010 needs this | ||
|
||
Serial.begin(115200); | ||
Serial.println("DHT_endless.ino"); | ||
Serial.print("LIBRARY VERSION: "); | ||
Serial.println(DHTNEW_LIB_VERSION); | ||
Serial.println(); | ||
|
||
// MKR1010 needs this | ||
// mySensor.setDisableIRQ(false); | ||
} | ||
|
||
|
||
void loop() | ||
{ | ||
dht.read(); | ||
|
||
float HumiVal = dht.getHumidity(); | ||
float TempVal = dht.getTemperature(); | ||
|
||
Serial.print(count++); | ||
Serial.print("\t"); | ||
for (int i = 0; i < 5; i++) | ||
{ | ||
if (dht._bits[i] < 0x10) Serial.print("0"); | ||
Serial.print(dht._bits[i], HEX); | ||
Serial.print(" "); | ||
} | ||
Serial.print("\t\t"); | ||
Serial.print(TempVal); | ||
Serial.print("\t"); | ||
Serial.print(HumiVal); | ||
Serial.println(); | ||
|
||
delay(2000); | ||
} | ||
|
||
|
||
// -- 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
name=DHTNEW | ||
version=0.5.1 | ||
version=0.5.2 | ||
author=Rob Tillaart <[email protected]> | ||
maintainer=Rob Tillaart <[email protected]> | ||
sentence=Arduino library for DHT temperature and humidity sensor, with automatic sensortype recognition. | ||
|