From f0ff69d8d1588631b7eb1472b155bdfe225dd4c9 Mon Sep 17 00:00:00 2001 From: destroyedlolo Date: Tue, 27 Mar 2018 21:59:32 +0200 Subject: [PATCH] Tell when a conversion is ignored --- examples/DS18B20_DHT22/DS18B20_DHT22.ino | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/DS18B20_DHT22/DS18B20_DHT22.ino b/examples/DS18B20_DHT22/DS18B20_DHT22.ino index fd504e7..014f234 100644 --- a/examples/DS18B20_DHT22/DS18B20_DHT22.ino +++ b/examples/DS18B20_DHT22/DS18B20_DHT22.ino @@ -59,6 +59,10 @@ void owRcv( OneWireSlave::ReceiveEvent evt, byte cmd ){ state = DeviceState::CONVERTING; OWSlave.beginWriteBit(0, true); // send zeros as long as the conversion is not finished } +#ifdef DEBUG + else + Serial.println(F("Ignored StartConv")); +#endif break; case OW_Cmd::READ_SCRATCHPAD: state = DeviceState::WAIT4RESET; @@ -68,7 +72,7 @@ void owRcv( OneWireSlave::ReceiveEvent evt, byte cmd ){ default: Serial.print(F("Unknown command :")); Serial.println( cmd, HEX ); -#endif +#endif } } }