@@ -21,16 +21,17 @@ Furthermore there are a number of compatible sensors, these are not tested eithe
2121
2222Accuracy table
2323
24- | Sensor | Temperature | Humidity | Notes |
25- | :-------:| :-----------:| :--------:| :-------|
26- | SHT20 | ~ 0.3 | ±3.0 | |
27- | SHT21 | ~ 0.3 | ±3.0 | |
28- | SHT25 | ~ 0.3 | ±1.8 | |
29- | HTU20 | | | to-do |
30- | HTU21 | | | to-do |
31- | Si7013 | | | to-do |
32- | Si7020 | | | to-do |
33- | Si7021 | | | to-do |
24+ | Sensor | Temperature | Humidity | Notes |
25+ | :---------:| :-----------:| :--------:| :--------|
26+ | SHT20 | ~ 0.3 | ±3.0 | |
27+ | SHT21 | ~ 0.3 | ±3.0 | |
28+ | SHT25 | ~ 0.3 | ±1.8 | |
29+ | HTU20 | | | to-do |
30+ | HTU21 | | | to-do |
31+ | Si7013 | | | to-do |
32+ | Si7020 | | | to-do |
33+ | Si7021 | | | to-do |
34+ | GY21 | | | to-do |
3435
3536
3637All sensors in this family of sensors have address 0x40 (64 decimal).
@@ -40,6 +41,10 @@ or one should switch sensors on/off like the select in SPI communication.
4041
4142## Interface
4243
44+ ``` cpp
45+ #include " SHT2x.h"
46+ ```
47+
4348#### Constructors
4449
4550All classes below are derived from SHT2x class.
@@ -100,18 +105,18 @@ TODO elaborate documentation.
100105- ** int getError()** returns last set error flag and clear it.
101106Be sure to clear the error flag by calling ** getError()** before calling any command as the error flag could be from a previous command.
102107
103- | Value | Symbolic | Description | Notes |
104- | :------:| :--------------------------| :----------------------------| : ---------|
105- | 0x00 | SHT2x_OK | no error | |
106- | 0x81 | SHT2x_ERR_WRITECMD | I2C write failed | |
107- | 0x82 | SHT2x_ERR_READBYTES | I2C read failed | |
108- | 0x83 | SHT2x_ERR_HEATER_OFF | Could not switch off heater | |
109- | 0x84 | SHT2x_ERR_NOT_CONNECT | Could not connect | |
110- | 0x85 | SHT2x_ERR_CRC_TEMP | CRC error in temperature | |
111- | 0x86 | SHT2x_ERR_CRC_HUM | CRC error in humidity | |
112- | 0x87 | SHT2x_ERR_CRC_STATUS | CRC error in status field | not used |
113- | 0x88 | SHT2x_ERR_HEATER_COOLDOWN | Heater need to cool down | |
114- | 0x88 | SHT2x_ERR_HEATER_ON | Could not switch on heater | |
108+ | Value | Symbolic | Description | Notes |
109+ | :------- :| :---------------------------- | :------------------------------ | :-- ---------|
110+ | 0x00 | SHT2x_OK | no error | |
111+ | 0x81 | SHT2x_ERR_WRITECMD | I2C write failed | |
112+ | 0x82 | SHT2x_ERR_READBYTES | I2C read failed | |
113+ | 0x83 | SHT2x_ERR_HEATER_OFF | Could not switch off heater | |
114+ | 0x84 | SHT2x_ERR_NOT_CONNECT | Could not connect | |
115+ | 0x85 | SHT2x_ERR_CRC_TEMP | CRC error in temperature | |
116+ | 0x86 | SHT2x_ERR_CRC_HUM | CRC error in humidity | |
117+ | 0x87 | SHT2x_ERR_CRC_STATUS | CRC error in status field | not used |
118+ | 0x88 | SHT2x_ERR_HEATER_COOLDOWN | Heater need to cool down | |
119+ | 0x88 | SHT2x_ERR_HEATER_ON | Could not switch on heater | |
115120
116121Note: the HTU20 / HTU21 classes share the same error codes.
117122
@@ -175,12 +180,12 @@ From HTU20 datasheet
175180
176181Datasheet SHT20 Table 8: (resolution)
177182
178- | RES | Humidity | Temperature |
179- | :-----:| :---------:| :-----------:|
180- | 0 | 12 bit | 14 bit |
181- | 1 | 08 bit | 12 bit |
182- | 2 | 10 bit | 13 bit |
183- | 3 | 11 bit | 11 bit |
183+ | RES | Humidity | Temperature |
184+ | :-----:| :---------- :| :-- -----------:|
185+ | 0 | 12 bit | 14 bit |
186+ | 1 | 08 bit | 12 bit |
187+ | 2 | 10 bit | 13 bit |
188+ | 3 | 11 bit | 11 bit |
184189
185190Datasheet SHT20 Table 7: (timing) and results of real measurements.
186191( https://github.com/RobTillaart/SHT2x/pull/11 )
@@ -205,25 +210,24 @@ Timing in milliseconds.
205210
206211#### Must
207212- improve documentation
213+ - reorganize interface
208214- clean up code.
209215
210216
211- #### 0.3 .0
212- - add crc8 check (need sensor)
217+ #### 0.4 .0
218+ - add crc8 check (need sensor to test )
213219- improve error handling (all code paths)
214220- investigate blocking delay() in read
215221- add offset for temperature and humidity
216- - move code from .h to .cpp
217- - add GY21 as derived class name
218222
219223
220- #### ASYNC 0.3 .0
224+ #### ASYNC 0.4 .0
221225improvements for interface.
222226
223- - ** bool requestReady()** checks both.
224- - ** bool requestPending()** checks .
225- - ** uint8_t getRequestType()** returns 0, 1, 2
226- - documentation
227+ - ** bool requestReady()** checks both.
228+ - ** bool requestPending()** checks.
229+ - ** uint8_t getRequestType()** returns 0, 1, 2.
230+ - async documentation
227231
228232
229233#### Should
@@ -236,9 +240,9 @@ improvements for interface.
236240
237241
238242#### Could
239- - investigate resolution anomalies
240243- fix TODO in code (.cpp and .h) and documentation
241244- update unit tests
245+ - add type info in derived classes?
242246
243247
244248#### Wont
0 commit comments