more specific debug during scan
This commit is contained in:
parent
3ea940b745
commit
fbba4799ad
|
|
@ -67,14 +67,18 @@ bool Adafruit_I2CDevice::detected(void) {
|
||||||
|
|
||||||
// A basic scanner, see if it ACK's
|
// A basic scanner, see if it ACK's
|
||||||
_wire->beginTransmission(_addr);
|
_wire->beginTransmission(_addr);
|
||||||
|
#ifdef DEBUG_SERIAL
|
||||||
|
DEBUG_SERIAL.print(F("Address 0x"));
|
||||||
|
DEBUG_SERIAL.print(_addr);
|
||||||
|
#endif
|
||||||
if (_wire->endTransmission() == 0) {
|
if (_wire->endTransmission() == 0) {
|
||||||
#ifdef DEBUG_SERIAL
|
#ifdef DEBUG_SERIAL
|
||||||
DEBUG_SERIAL.println(F("Detected"));
|
DEBUG_SERIAL.println(F(" Detected"));
|
||||||
#endif
|
#endif
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
#ifdef DEBUG_SERIAL
|
#ifdef DEBUG_SERIAL
|
||||||
DEBUG_SERIAL.println(F("Not detected"));
|
DEBUG_SERIAL.println(F(" Not detected"));
|
||||||
#endif
|
#endif
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue