Skip to content

Commit

Permalink
[DHT] change pin into input before delay
Browse files Browse the repository at this point in the history
  • Loading branch information
uzi18 committed Aug 30, 2019
1 parent f8f2db9 commit 879c75d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/_P005_DHT.ino
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ bool P005_do_plugin_read(struct EventStruct *event) {
}

digitalWrite(Plugin_005_DHT_Pin, HIGH);
pinMode(Plugin_005_DHT_Pin, INPUT);

switch (Par3) {
case P005_DHT11:
Expand All @@ -173,8 +174,6 @@ bool P005_do_plugin_read(struct EventStruct *event) {
break;
}

pinMode(Plugin_005_DHT_Pin, INPUT);

if(!P005_waitState(0)) {P005_log(event, P005_error_no_reading); return false; }
if(!P005_waitState(1)) {P005_log(event, P005_error_no_reading); return false; }
noInterrupts();
Expand Down

0 comments on commit 879c75d

Please sign in to comment.