Required Hardware
Infrared (IR) is a cheap and (as you’ll soon discover) easy way to add wireless control to your project.
Wiring
To wire your IR Receiver Diode to your Arduino, connect the following pins:
- IR Receiver Diode Pin 1 –> Arduino Input 11
- IR Receiver Diode Pin 2 –> Arduino Ground
- IR Receiver Diode Pin 3 –> Arduino +5V
21 Buttons
- 1 – FFA25D
- 2 – FF629D
- 3 – FFE21D
- 4 – FF22DD
- 5 – FF02FD
- 6 – FFC23D
- 7 – FFE01F
- 8 – FFA857
- 9 – FF906F
- 10 -FF6897
- 11 -FF9867
- 12 -FFB04F
- 13 -FF30CF
- 14 -FF18E7
- 15 -FF7A85
- 16 -FF10EF
- 17 -FF38C7
- 18 -FF5AA5
- 19 -FF42BD
- 20 -FF4AB5
- 21 -FF52AD
For some reason, I followed step-by-step your tutorial without any success. After debugging the code, I found that a variable TKD2 was not declared in the scope. Also, int RECV_PIN was not assigned. If you can help me finding this issue it would be great! thank you.
When im doing verfiy it says:
C:\Program Files (x86)\Arduino\libraries\RobotIRremote\src\IRremoteTools.cpp:5:16: error: ‘TKD2’ was not declared in this scope
int RECV_PIN = TKD2; // the pin the IR receiver is connected to
^
exit status 1
Error compiling.
what should i do?
If you’re still having this problem, what you want to do is delete a library called RobotIRremote.h I had the same problem, the one you want to use (IRremote.h) and that one are conflicting.
Nice tutorial Thanks for sharing