Go Down

Topic: IR sensor code error (Read 91 times) previous topic - next topic

Conner_Boggan42

Feb 12, 2019, 05:56 am Last Edit: Feb 12, 2019, 05:57 am by Conner_Boggan42
Hello, I am trying to use an ir sensor. I have a sketch I found online that should give me the hexidecimal code of each button on my remote, but I keep getting an error and I have zero clue how to fix it.

Here is the error:

C:\Users\cbogg\Documents\Arduino\libraries\Robot_IR_Remote\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 for board Arduino/Genuino Uno.

The sketch should be attached.
If you could provide any help that would be amazing!

Thank you!

BJHenry

TDK2 isn't the name of any Arduino pin, have you already defined that as a valid pin?

Conner_Boggan42

#2
Feb 14, 2019, 01:31 am Last Edit: Feb 14, 2019, 01:36 am by Conner_Boggan42
How could I fix this? 

TDK2 isn't the name of any Arduino pin, have you already defined that as a valid pin?

BJHenry

Please read through point number 7 here, and then post your code accordingly.

Go Up