|
1 | 1 | /* |
2 | | - * IRrecord: record and play back IR signals as a minimal |
| 2 | + * IRrecord.cpp |
| 3 | + * |
| 4 | + * Record and play back IR signals as a minimal |
3 | 5 | * An IR detector/demodulator must be connected to the input RECV_PIN. |
4 | 6 | * An IR LED must be connected to the output PWM pin 3. |
5 | 7 | * A button must be connected between the input SEND_BUTTON_PIN and ground. |
|
10 | 12 | * If an IR code is received, record it. |
11 | 13 | * |
12 | 14 | * Initially coded 2009 Ken Shirriff http://www.righto.com |
| 15 | + * |
| 16 | + * This file is part of Arduino-IRremote https://github.com/z3t0/Arduino-IRremote. |
13 | 17 | */ |
14 | 18 |
|
15 | 19 | #include <IRremote.h> |
16 | 20 |
|
17 | | -#if !defined(USE_STANDARD_DECODE) |
18 | | -#warning "Enable USE_STANDARD_DECODE on line 34 of IRremote.h to enable this improved version of IRrecord example." |
19 | | -#endif |
20 | | - |
21 | 21 | #if defined(ESP32) |
22 | 22 | int IR_RECEIVE_PIN = 15; |
23 | 23 | int SEND_BUTTON_PIN = 16; // RX2 pin |
@@ -48,8 +48,8 @@ void sendCode(storedIRDataStruct *aIRDataToSend); |
48 | 48 |
|
49 | 49 | void setup() { |
50 | 50 | Serial.begin(115200); |
51 | | -#if defined(__AVR_ATmega32U4__) || defined(SERIAL_USB) || defined(SERIAL_PORT_USBVIRTUAL) |
52 | | - delay(2000); // To be able to connect Serial monitor after reset and before first printout |
| 51 | +#if defined(__AVR_ATmega32U4__) || defined(SERIAL_USB) || defined(SERIAL_PORT_USBVIRTUAL) || defined(ARDUINO_attiny3217) |
| 52 | + delay(2000); // To be able to connect Serial monitor after reset or power up and before first printout |
53 | 53 | #endif |
54 | 54 | // Just to know which program is running on my Arduino |
55 | 55 | Serial.println(F("START " __FILE__ " from " __DATE__ "\r\nUsing library version " VERSION_IRREMOTE)); |
@@ -145,7 +145,7 @@ void storeCode(IRData *aIRReceivedData) { |
145 | 145 | IrReceiver.compensateAndStoreIRResultInArray(sStoredIRData.rawCode); |
146 | 146 | } else { |
147 | 147 | IrReceiver.printIRResultShort(&Serial); |
148 | | - sStoredIRData.receivedIRData.flags = 0; // clear flags for later (not) printing |
| 148 | + sStoredIRData.receivedIRData.flags = 0; // clear flags -esp. repeat- for later sending |
149 | 149 | Serial.println(); |
150 | 150 | } |
151 | 151 | } |
|
0 commit comments