Skip to content

Commit

Permalink
Add logging
Browse files Browse the repository at this point in the history
  • Loading branch information
sidoh committed Sep 1, 2019
1 parent 97d7948 commit 46abe0b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/TempIface/TempIface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,15 @@ void TempIface::begin() {

char strAddr[50];

for (uint8_t i = 0; i < sensors->getDeviceCount(); ++i) {
Serial.printf_P(PSTR("[Thermometer Scan] Detected %d devices\n"), sensors->getDeviceCount());

for (size_t i = 0; i < sensors->getDeviceCount(); ++i) {
uint8_t* addr = new uint8_t[8];
sensors->getAddress(addr, i);
IntParsing::bytesToHexStr(addr, 8, strAddr, sizeof(strAddr)-1);

Serial.printf_P(PSTR("[Thermometer Scan] ... found thermometer with address: %s\n"), strAddr);

seenIds[strAddr] = addr;
}

Expand Down

0 comments on commit 46abe0b

Please sign in to comment.