Skip to content

Commit 4b358c7

Browse files
authored
update library.json, readme, license, minor edits (#29)
* update library.json, readme, license, minor edits
1 parent ab5cbfe commit 4b358c7

File tree

19 files changed

+78
-28
lines changed

19 files changed

+78
-28
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2019-2021 Rob Tillaart
3+
Copyright (c) 2019-2022 Rob Tillaart
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
# SHT31
1010

11-
Arduino library for the SHT31 temperature and humidity sensor
11+
Arduino library for the SHT31 temperature and humidity sensor.
1212

1313
Relates to the SHT85 library - https://github.com/RobTillaart/SHT85
1414

@@ -37,10 +37,10 @@ https://github.com/hawesg/SHT31D_Particle_Photon_ClosedCube
3737
#### Base interface
3838

3939
- **SHT31()** constructor.
40-
- **bool begin(address, dataPin, clockPin)** begin function for ESP8266 & ESP32;
40+
- **bool begin(uint8_taddress, uint8_tdataPin, uint8_tclockPin)** begin function for ESP8266 & ESP32;
4141
returns false if device address is incorrect or device cannot be reset.
42-
- **bool begin(address)** for single I2C bus platforms, e.g UNO.
43-
- **bool begin(address, TwoWire \*wire)** for platforms with multiple I2C buses.
42+
- **bool begin(uint8_t address)** for single I2C bus platforms, e.g UNO.
43+
- **bool begin(uint8_t address, TwoWire \*wire)** for platforms with multiple I2C buses.
4444
- **bool read(bool fast = true)** blocks 4 (fast) or 15 (slow) milliseconds + actual read + math.
4545
Does read both the temperature and humidity.
4646
- **bool isConnected()** check sensor is reachable over I2C. Returns false if not connected.
@@ -62,7 +62,7 @@ you've performed a new reading.
6262
- **int getError()** returns last set error flag and clear it.
6363
Be sure to clear the error flag by calling **getError()** before calling any command as the error flag could be from a previous command.
6464

65-
| Error | Symbolic | Description
65+
| Error | Symbolic | Description |
6666
|:-----:|:--------------------------|:----------------------------|
6767
| 0x00 | SHT31_OK | no error |
6868
| 0x81 | SHT31_ERR_WRITECMD | I2C write failed |
@@ -71,7 +71,7 @@ Be sure to clear the error flag by calling **getError()** before calling any com
7171
| 0x84 | SHT31_ERR_NOT_CONNECT | Could not connect |
7272
| 0x85 | SHT31_ERR_CRC_TEMP | CRC error in temperature |
7373
| 0x86 | SHT31_ERR_CRC_HUM | CRC error in humidity |
74-
| 0x87 | SHT31_ERR_CRC_STATUS | CRC error in statusfield |
74+
| 0x87 | SHT31_ERR_CRC_STATUS | CRC error in status field |
7575
| 0x88 | SHT31_ERR_HEATER_COOLDOWN | Heater need to cool down |
7676
| 0x88 | SHT31_ERR_HEATER_ON | Could not switch on heater |
7777

@@ -130,8 +130,8 @@ Returns false if reading fails or in case of a CRC failure.
130130
| 4 | System reset detected | 0 | no reset since last ‘clear status register’ command
131131
| | | 1 | reset detected (hard or soft reset command or supply fail) - default
132132
| 3-2 | Reserved | 00 |
133-
| 1 | Command status | 0 | last cmd executed successfully
134-
| | | 1 | last cmd not processed. Invalid or failed checksum
133+
| 1 | Command status | 0 | last command executed successfully
134+
| | | 1 | last command not processed. Invalid or failed checksum
135135
| 0 | Write data checksum status | 0 | checksum of last write correct
136136
| | | 1 | checksum of last write transfer failed
137137

@@ -151,3 +151,9 @@ See examples.
151151
- investigate command ART (auto sampling at 4 Hz)
152152
- investigate command BREAK (stop auto sampling)
153153
- software I2C experiments?
154+
- separate releaseNotes.md
155+
156+
157+
#### Wont
158+
159+

SHT31.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//
22
// FILE: SHT31.cpp
33
// AUTHOR: Rob Tillaart
4-
// VERSION: 0.3.4
4+
// VERSION: 0.3.5
55
// DATE: 2019-02-08
66
// PURPOSE: Arduino library for the SHT31 temperature and humidity sensor
77
// https://www.adafruit.com/product/2857
@@ -29,6 +29,7 @@
2929
// 0.3.3 2021-08-24 fix #22 prevent heater to switch on too fast.
3030
// update readme
3131
// 0.3.4 2021-09-19 update build-CI
32+
// 0.3.5 2021-12-28 update library.json, readme, license, minor edits
3233

3334

3435
#include "SHT31.h"

SHT31.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// FILE: SHT31.h
44
// AUTHOR: Rob Tillaart
5-
// VERSION: 0.3.4
5+
// VERSION: 0.3.5
66
// DATE: 2019-02-08
77
// PURPOSE: Arduino library for the SHT31 temperature and humidity sensor
88
// https://www.adafruit.com/product/2857
@@ -14,7 +14,7 @@
1414
#include "Wire.h"
1515

1616

17-
#define SHT31_LIB_VERSION (F("0.3.4"))
17+
#define SHT31_LIB_VERSION (F("0.3.5"))
1818

1919

2020
// fields readStatus

examples/SHT31_I2Cspeed/SHT31_I2Cspeed.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
//
22
// FILE: SHT31_I2Cspeed
33
// AUTHOR: Rob Tillaart
4-
// VERSION: 0.1.0
54
// PURPOSE: testing the performance at different I2C speeds
65
// URL: https://github.com/RobTillaart/SHT31
76

@@ -61,3 +60,4 @@ void test()
6160

6261

6362
// -- END OF FILE --
63+

examples/SHT31_async/SHT31_async.ino

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
//
22
// FILE: SHT31_async.ino
33
// AUTHOR: Rob Tillaart
4-
// VERSION: 0.1.0
54
// PURPOSE: demo async interface
65
// URL: https://github.com/RobTillaart/SHT31
76

@@ -67,4 +66,6 @@ void loop()
6766
cnt++; // simulate other activity
6867
}
6968

69+
7070
// -- END OF FILE --
71+

examples/SHT31_demo/SHT31_demo.ino

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
//
22
// FILE: SHT31_demo.ino
33
// AUTHOR: Rob Tillaart
4-
// VERSION: 0.0.2
54
// PURPOSE: demo
65
// URL: https://github.com/RobTillaart/SHT31
76

@@ -49,4 +48,6 @@ void loop()
4948
delay(100);
5049
}
5150

51+
5252
// -- END OF FILE --
53+

examples/SHT31_heater/SHT31_heater.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
//
22
// FILE: SHT31_heater.ino
33
// AUTHOR: Rob Tillaart
4-
// VERSION: 0.1.0
54
// PURPOSE: demo heater functions
65
// URL: https://github.com/RobTillaart/SHT31
76

@@ -67,3 +66,4 @@ void printHeaterStatus(uint16_t status)
6766

6867

6968
// -- END OF FILE --
69+

examples/SHT31_isConnected/SHT31_isConnected.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
//
22
// FILE: SHT31_isConnected.ino
33
// AUTHOR: Rob Tillaart
4-
// VERSION: 0.1.0
54
// PURPOSE: demo (needs 0.2.4 or up)
65
// URL: https://github.com/RobTillaart/SHT31
76

@@ -74,3 +73,4 @@ void loop()
7473

7574

7675
// -- END OF FILE --
76+

examples/SHT31_lastRead/SHT31_lastRead.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
//
22
// FILE: SHT31_lastRead.ino
33
// AUTHOR: Rob Tillaart
4-
// VERSION: 0.1.0
54
// PURPOSE: demo
65
// URL: https://github.com/RobTillaart/SHT31
76

@@ -48,3 +47,4 @@ void loop()
4847

4948

5049
// -- END OF FILE --
50+

0 commit comments

Comments
 (0)