Skip to content

Commit fbba479

Browse files
committed
more specific debug during scan
1 parent 3ea940b commit fbba479

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Adafruit_I2CDevice.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,18 @@ bool Adafruit_I2CDevice::detected(void) {
6767

6868
// A basic scanner, see if it ACK's
6969
_wire->beginTransmission(_addr);
70+
#ifdef DEBUG_SERIAL
71+
DEBUG_SERIAL.print(F("Address 0x"));
72+
DEBUG_SERIAL.print(_addr);
73+
#endif
7074
if (_wire->endTransmission() == 0) {
7175
#ifdef DEBUG_SERIAL
72-
DEBUG_SERIAL.println(F("Detected"));
76+
DEBUG_SERIAL.println(F(" Detected"));
7377
#endif
7478
return true;
7579
}
7680
#ifdef DEBUG_SERIAL
77-
DEBUG_SERIAL.println(F("Not detected"));
81+
DEBUG_SERIAL.println(F(" Not detected"));
7882
#endif
7983
return false;
8084
}

0 commit comments

Comments
 (0)