File tree Expand file tree Collapse file tree 2 files changed +8
-16
lines changed Expand file tree Collapse file tree 2 files changed +8
-16
lines changed Original file line number Diff line number Diff line change 1
- name =SparkFun Si7021 Humidity and Temperature Sensor
2
- version =1.0.0
1
+ name =SparkFun Si7021 Humidity and Temperature Sensor
2
+ version =1.0.1
3
3
author =Joel@SparkFun Electronics <
[email protected] >
4
4
maintainer =SparkFun Electronics <sparkfun.com>
5
- sentence =Library for Si7021 Humidity and Temperature Sensor.
6
- paragraph =Library for Si7021 Humidity and Temperature Sensor.
5
+ sentence =Library for Si7021 Humidity and Temperature Sensor.
6
+ paragraph =Library for Si7021 Humidity and Temperature Sensor.
7
7
category =Sensors
8
8
url =https://github.com/sparkfun/Si7021_Breakout
9
- architectures =*
9
+ architectures =*
Original file line number Diff line number Diff line change @@ -198,17 +198,9 @@ uint16_t Weather::makeMeasurment(uint8_t command)
198
198
delay (100 );
199
199
200
200
Wire.requestFrom (ADDRESS,nBytes);
201
- // Wait for data
202
- int counter = 0 ;
203
- while (Wire.available () < nBytes){
204
- delay (1 );
205
- counter ++;
206
- if (counter >100 ){
207
- // Timeout: Sensor did not return any data
208
- return 100 ;
209
- }
210
- }
211
-
201
+ if (Wire.available () != nBytes)
202
+ return 100 ;
203
+
212
204
unsigned int msb = Wire.read ();
213
205
unsigned int lsb = Wire.read ();
214
206
// Clear the last to bits of LSB to 00.
You can’t perform that action at this time.
0 commit comments