Skip to content

Commit

Permalink
Update the timing to allow for faster readings. Remove unneeded pull …
Browse files Browse the repository at this point in the history
…up after the conversion start : adafruit/DHT-sensor-library#48
  • Loading branch information
seblucas committed Oct 18, 2016
1 parent 0c9f69e commit 03f9bcf
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions dht22.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,9 @@ static int read_dht22_dat()
// pull pin down for 18 milliseconds
pinMode(DHTPIN, OUTPUT);
digitalWrite(DHTPIN, HIGH);
delay(10);
delay(250);
digitalWrite(DHTPIN, LOW);
delay(18);
// then pull it up for 40 microseconds
digitalWrite(DHTPIN, HIGH);
delayMicroseconds(40);
delay(20);
// prepare to read the pin
pinMode(DHTPIN, INPUT);

Expand Down

0 comments on commit 03f9bcf

Please sign in to comment.