The previous `architectures` value of `atmelavr` causes the example sketches to appear under **File > Examples > INCOMPATIBLE > DHTlib** and also a warning to be displayed during compilation of any sketch that includes the library:
WARNING: library DHTlib claims to run on (atmelavr) architecture(s) and may be incompatible with your current board which runs on (avr) architecture(s).
The previous value causes the example sketches to appear under File > Examples > INCOMPATIBLE > DHTlib and also a warning to be displayed during compilation of any sketch that includes the library:
WARNING: library DHTlib claims to run on (atmelavr) architecture(s) and may be incompatible with your current board which runs on (avr) architecture(s).
Incorrect architecture value causes the warning:
WARNING: library DHTlib claims to run on [atmelavr] architecture(s) and may be incompatible with your current board which runs on [avr] architecture(s).
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".
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.
+ 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)
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)