Commit Graph

24 Commits

Author SHA1 Message Date
Harry93x
fad0391f62 Add timing analysis, format output, limit execution cycles
To increase the usefulness of the example, I added the measurement of
the complete cycle, which is the important figure. The reading time
itself, though interesting, is not the limiting factor according to the
datasheet.
Additionally, I updated the printing instructions to create a nicely
formatted output and limited the number cycles necessary to reach "del
== 0".
2015-11-14 21:50:01 +01:00
rob tillaart
e475755fe0 fix delayMicroseconds 2015-10-12 20:48:53 +02:00
rob tillaart
a48ea1ea29 + version 0.1.21
+ replaced delay by delayMicroseconds()
+ removed dependency on F_CPU
+ added constructor
+ refactor
2015-10-12 20:43:24 +02:00
Peter Hahn
174a065598 Replace delay with delayMicroseconds to let it work while interruppts are disabeled.
In multihreaded environment (I used NilRTOS) its usefull to disable interruppts while reading the sensors. However delay() requires interrupts to be enabled. If you read more than one sensor in a sequence the 2nd one gets spurious DHTLIB_ERROR_CONNECT errors. Timing issues with the wakeup delay().
They don't used to happen it interrupts are enabled. Replacing delay() with delayMicroseconds() solved this issue.
2015-10-11 22:56:25 +02:00
rob tillaart
33843c68ba + version 0.1.20
+ changed return type to int8_t reducing footprint with 34 bytes
+ minor comment change
2015-03-01 11:53:47 +01:00
rob tillaart
9bca4c27da + fix switch case (copy paste error) 2015-02-03 10:14:17 +01:00
rob tillaart
54ee843935 + version 0.1.19
+ fixed wrong mask DHT11
2015-01-21 21:46:04 +01:00
rob tillaart
baa1e15833 + 0.1.18 fixed support for DHT11 again 2014-11-25 19:40:25 +01:00
rob tillaart
16a464af0d + updated readme.txt (dhtlib) 2014-11-16 14:25:44 +01:00
rob tillaart
9d290fe4fc + added support for all errors 2014-10-23 16:15:26 +02:00
rob tillaart
e722f7d26c + version 0.1.17
+ replaced micros() with adaptive loopcount
+ removed DHTLIB_INVALID_VALUE (user should decide if value is usable)
+ more detailed errors per phase of handshake
+ added DHTLIB_ERROR_CONNECT
+ added DHTLIB_ERROR_ACK_L  DHTLIB_ERROR_ACK_H
+ added fix for pre 1.0 (not tested)
2014-10-15 08:00:59 +02:00
rob tillaart
41cc579488 + masking unused bits (less errors);
+ refactored bits[] usage
2014-10-15 07:48:27 +02:00
rob tillaart
fa681d5322 + reduced # micros calls 2->1 in inner loop. => footprint -18
detection of the zero/one is doen by measuring the whole bit LOW+HIGH
+ improved wait for acknowledge
+ merged two loopCounters into one.
+ layout
+ dht22_test sketch collects statistics (every 20 reads)
2014-10-08 16:37:30 +02:00
rob tillaart
e4ad65003b + replace digital read with faster (~3x) code
=> smaller footprint
  => more robust for low MHz devices
2014-10-05 10:52:52 +02:00
rob tillaart
e2d0b3b613 + version 0.1.13 (version 0.1.12 not usable -> skipped)
+ added support for DHT33 + DHT44
+ added test sketches for DHT33 + DHT44
+ improved protocol handling
+ refactored code style,
+ refactored footprint (part interface inline)
+ renamed private _read => _readSensor
+ added dht_tuning sketch to see timing
2014-06-26 20:48:20 +02:00
rob tillaart
ba5e9bd8f9 refactored TIMEOUT 2014-06-01 13:58:36 +02:00
rob tillaart
1f2314cdbf optimized wakeup and timeout 2014-06-01 09:48:06 +02:00
rob tillaart
2f60754376 update 2014-02-10 18:56:59 +01:00
rob tillaart
926b202e2c + now including the readme.txt 2014-02-10 18:56:10 +01:00
rob tillaart
54c8c468ef + initial version of readme
+ fix versionnr
2014-02-09 19:35:40 +01:00
rob tillaart
616ee0c061 + 0.1.09
+ optimize size
+ timeout check
+ use of mask to minimize shifts
+ added time measurement in dht22_test
+ reindented code
2014-02-08 13:53:52 +01:00
Rob Tillaart
4126dfc63a + 0.1.08
+ minor revision of comments
+ added formula for timeout to support DUE
2013-11-26 08:29:24 +01:00
Rob Tillaart
c7c5bdf661 + finalized support for DHT21
+ made TIMEOUT depends on clock ==> F_CPU
2013-09-29 12:35:28 +02:00
Rob Tillaart
fabe3ba99b Add dht library to git 2013-08-28 13:57:45 +02:00