Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit a564d33

Browse files
committedJun 30, 2020
Closes #7
1 parent 8effa45 commit a564d33

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎src/SparkFunMLX90614.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ uint8_t IRTherm::sleep(void)
281281
uint8_t IRTherm::wake(void)
282282
{
283283
// Wake operation from datasheet
284-
Wire.end(); // stop i2c bus to send wake up request via digital pins
284+
Wire.endTransmission(true); // stop i2c bus transmission BEFORE sending wake up request
285285
pinMode(SCL, INPUT); // SCL high
286286
pinMode(SDA, OUTPUT);
287287
digitalWrite(SDA, LOW); // SDA low
@@ -293,7 +293,7 @@ uint8_t IRTherm::wake(void)
293293
digitalWrite(SCL, LOW); // SCL low
294294
delay(10); // Delay at least 1.44ms
295295
pinMode(SCL, INPUT); // SCL high
296-
Wire.begin();
296+
Wire.beginTransmission(_deviceAddress); // reactivate i2c bus transmission AFTER sending wake up request
297297
}
298298

299299
int16_t IRTherm::calcRawTemp(float calcTemp)

0 commit comments

Comments
 (0)
Please sign in to comment.