@@ -137,13 +137,16 @@ void setup() {
137137
138138#if FLASHEND >= 0x3FFF // For 16k flash or more, like ATtiny1604. Code does not fit in program memory of ATtiny85 etc.
139139 Serial.println ();
140- Serial.print (F (" If you connect debug pin " ));
140+ if (digitalRead (DEBUG_BUTTON_PIN) != LOW) {
141+ Serial.print (F (" If you connect debug pin " ));
141142# if defined(APPLICATION_PIN_STRING)
142- Serial.print (APPLICATION_PIN_STRING);
143+ Serial.print (APPLICATION_PIN_STRING);
143144# else
144- Serial.print (DEBUG_BUTTON_PIN);
145+ Serial.print (DEBUG_BUTTON_PIN);
145146# endif
146- Serial.println (F (" to ground, raw data is always printed" ));
147+ Serial.print (F (" to ground, " ));
148+ }
149+ Serial.println (F (" raw data is always printed" ));
147150
148151 // infos for receive
149152 Serial.print (RECORD_GAP_MICROS);
@@ -201,9 +204,10 @@ void loop() {
201204 Serial.println (F (" Received noise or an unknown (or not yet enabled) protocol" ));
202205 }
203206 IrReceiver.printIRResultRawFormatted (&Serial, true );
204- } else {
207+ }
208+ if (IrReceiver.decodedIRData .protocol != UNKNOWN) {
205209 /*
206- * This is the info output for a successful receive in normal mode
210+ * The info output for a successful receive
207211 */
208212 IrReceiver.printIRResultShort (&Serial);
209213 IrReceiver.printIRSendUsage (&Serial);
0 commit comments