Skip to content

Commit 85fb107

Browse files
committed
0.3.1 SHT31
1 parent 3656f18 commit 85fb107

File tree

14 files changed

+51
-9
lines changed

14 files changed

+51
-9
lines changed

libraries/SHT31/README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
Arduino library for the SHT31 temperature and humidity sensor
1010

11+
1112
## Description
1213

1314
The SHT3x family of sensors should work up to 1 MHz I2C
@@ -25,6 +26,7 @@ not tested yet.
2526
An elaborated library for the SHT31 sensor can be found here
2627
https://github.com/hawesg/SHT31D_Particle_Photon_ClosedCube
2728

29+
2830
## Interface
2931

3032
#### Base interface
@@ -42,6 +44,7 @@ returns false if device address is incorrect or device cannot be reset.
4244
- **getHumidity()** returns relative humidity in %
4345
- **getTemperature()** returns temperature in °C
4446

47+
4548
#### Error interface
4649

4750
- **getError()** returns last set error flag and clear it.
@@ -59,7 +62,6 @@ Be sure to clear the error flag by calling **getError()** before calling any com
5962
| 0x87 | SHT31_ERR_CRC_STATUS | CRC error in statusfield |
6063

6164

62-
6365
#### Heater interface
6466

6567
Use the heater for max **180** seconds, and let it cool down an equal period of time.
@@ -77,6 +79,7 @@ This value is truncated to max 180 seconds.
7779
Will switch heat off if max heating time has passed.
7880
- **heatUp()** will be obsolete in the future.
7981

82+
8083
#### Async interface
8184

8285
See async example for usage
@@ -109,6 +112,7 @@ See async example for usage
109112
| 0 | Write data checksum status | '0': checksum of last write correct |
110113
| | | '1': checksum of last write transfer failed |
111114

115+
112116
## Operation
113117

114118
See examples

libraries/SHT31/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.0
4+
// VERSION: 0.3.1
55
// DATE: 2019-02-08
66
// PURPOSE: Arduino library for the SHT31 temperature and humidity sensor
77
// https://www.adafruit.com/product/2857
@@ -24,6 +24,7 @@
2424
// 0.2.6 2021-01-01 patch version 0.2.6
2525
//
2626
// 0.3.0 2021-01-04 arduino-ci
27+
// 0.3.1 2021-05-27 arduino-lint fixes
2728

2829

2930
#include "SHT31.h"

libraries/SHT31/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.0
5+
// VERSION: 0.3.1
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 "0.3.0"
17+
#define SHT31_LIB_VERSION (F("0.3.1"))
1818

1919

2020
// fields readStatus

libraries/SHT31/examples/SHT31_I2Cspeed/SHT31_I2Cspeed.ino

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
// PURPOSE: testing the performance at different I2C speeds
66
// URL: https://github.com/RobTillaart/SHT31
77

8+
89
#include "Wire.h"
910
#include "SHT31.h"
1011

@@ -15,6 +16,7 @@ uint32_t stop;
1516

1617
SHT31 sht;
1718

19+
1820
void setup()
1921
{
2022
Serial.begin(115200);
@@ -31,6 +33,7 @@ void setup()
3133
Serial.println();
3234
}
3335

36+
3437
void loop()
3538
{
3639
for (uint32_t I2Cfreq = 100000; I2Cfreq < 900000; I2Cfreq += 50000)
@@ -56,4 +59,5 @@ void test()
5659
delay(100);
5760
}
5861

62+
5963
// -- END OF FILE --

libraries/SHT31/examples/SHT31_async/SHT31_async.ino

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
// PURPOSE: demo async interface
66
// URL: https://github.com/RobTillaart/SHT31
77

8+
89
#include "Wire.h"
910
#include "SHT31.h"
1011

@@ -16,6 +17,7 @@ uint32_t cnt;
1617

1718
SHT31 sht;
1819

20+
1921
void setup()
2022
{
2123
Serial.begin(115200);
@@ -35,6 +37,7 @@ void setup()
3537
cnt = 0;
3638
}
3739

40+
3841
void loop()
3942
{
4043
if (sht.dataReady())

libraries/SHT31/examples/SHT31_demo/SHT31_demo.ino

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
// PURPOSE: demo
66
// URL: https://github.com/RobTillaart/SHT31
77

8+
89
#include "Wire.h"
910
#include "SHT31.h"
1011

@@ -15,6 +16,7 @@ uint32_t stop;
1516

1617
SHT31 sht;
1718

19+
1820
void setup()
1921
{
2022
Serial.begin(115200);
@@ -31,6 +33,7 @@ void setup()
3133
Serial.println();
3234
}
3335

36+
3437
void loop()
3538
{
3639
start = micros();

libraries/SHT31/examples/SHT31_heater/SHT31_heater.ino

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
// PURPOSE: demo heater functions
66
// URL: https://github.com/RobTillaart/SHT31
77

8+
89
#include "Wire.h"
910
#include "SHT31.h"
1011

@@ -13,6 +14,7 @@
1314
SHT31 sht;
1415
uint16_t status;
1516

17+
1618
void setup()
1719
{
1820
Serial.begin(115200);
@@ -43,6 +45,7 @@ void setup()
4345
Serial.println("switched off");
4446
}
4547

48+
4649
void loop()
4750
{
4851
// forced switch off
@@ -62,4 +65,5 @@ void printHeaterStatus(uint16_t status)
6265
}
6366
}
6467

68+
6569
// -- END OF FILE --

libraries/SHT31/examples/SHT31_isConnected/SHT31_isConnected.ino

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
// PURPOSE: demo (needs 0.2.4 or up)
66
// URL: https://github.com/RobTillaart/SHT31
77

8+
89
#include "Wire.h"
910
#include "SHT31.h"
1011

@@ -16,6 +17,7 @@ uint32_t stop;
1617
SHT31 sht;
1718
uint32_t connectionFails = 0;
1819

20+
1921
void setup()
2022
{
2123
Serial.begin(115200);
@@ -32,6 +34,7 @@ void setup()
3234
Serial.println();
3335
}
3436

37+
3538
void loop()
3639
{
3740
if ( sht.isConnected() )
@@ -59,4 +62,5 @@ void loop()
5962
delay(100);
6063
}
6164

65+
6266
// -- END OF FILE --

libraries/SHT31/examples/SHT31_lastRead/SHT31_lastRead.ino

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
// PURPOSE: demo
66
// URL: https://github.com/RobTillaart/SHT31
77

8+
89
#include "Wire.h"
910
#include "SHT31.h"
1011

@@ -15,6 +16,7 @@ uint32_t stop;
1516

1617
SHT31 sht;
1718

19+
1820
void setup()
1921
{
2022
Serial.begin(115200);
@@ -31,6 +33,7 @@ void setup()
3133
Serial.println();
3234
}
3335

36+
3437
void loop()
3538
{
3639
sht.read(); // default = true/fast slow = false
@@ -43,4 +46,5 @@ void loop()
4346
delay(100);
4447
}
4548

49+
4650
// -- END OF FILE --

libraries/SHT31/examples/SHT31_slowRead/SHT31_slowRead.ino

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
// PURPOSE: demo
66
// URL: https://github.com/RobTillaart/SHT31
77

8+
89
#include "Wire.h"
910
#include "SHT31.h"
1011

@@ -15,6 +16,7 @@ uint32_t stop;
1516

1617
SHT31 sht;
1718

19+
1820
void setup()
1921
{
2022
Serial.begin(115200);
@@ -31,6 +33,7 @@ void setup()
3133
Serial.println();
3234
}
3335

36+
3437
void loop()
3538
{
3639
start = micros();
@@ -45,4 +48,5 @@ void loop()
4548
delay(100);
4649
}
4750

51+
4852
// -- END OF FILE --

0 commit comments

Comments
 (0)