💬 Infrared Sender and Receiver
-
Following (I think) the instructions to the letter:
- Using a Pro Mini
- Installed the IRremote library (current version through Arduino Libraries Manager: 2.8.0)
- Copied exactly the sample code
When I come to compile, I get the following error:
/home/pc/Arduino/IrSensor/IrSensor.ino: In function 'void sendRCCode(byte)': IrSensor:361:32: error: 'AIWA_RC_T501' was not declared in this scope else if (pIr->code.type == AIWA_RC_T501) { ^~~~~~~~~~~~ IrSensor:362:15: error: 'class IRsend' has no member named 'sendAiwaRCT501'; did you mean 'sendRC5'? irsend.sendAiwaRCT501(pIr->code.value); ^~~~~~~~~~~~~~ sendRC5 IrSensor:364:83: error: 'MITSUBISHI' was not declared in this scope else if (pIr->code.type == LG || pIr->code.type == SANYO || pIr->code.type == MITSUBISHI) { ^~~~~~~~~~ /home/adams-pc/Arduino/IrSensor/IrSensor.ino: In function 'void dump(decode_results*)': IrSensor:419:43: error: 'USECPERTICK' was not declared in this scope Serial.print(results->rawbuf[i]*USECPERTICK, DEC); ^~~~~~~~~~~ IrSensor:422:49: error: 'USECPERTICK' was not declared in this scope Serial.print(-(int)results->rawbuf[i]*USECPERTICK, DEC); ^~~~~~~~~~~ exit status 1 'AIWA_RC_T501' was not declared in this scopeAm I missing something?
-
Following (I think) the instructions to the letter:
- Using a Pro Mini
- Installed the IRremote library (current version through Arduino Libraries Manager: 2.8.0)
- Copied exactly the sample code
When I come to compile, I get the following error:
/home/pc/Arduino/IrSensor/IrSensor.ino: In function 'void sendRCCode(byte)': IrSensor:361:32: error: 'AIWA_RC_T501' was not declared in this scope else if (pIr->code.type == AIWA_RC_T501) { ^~~~~~~~~~~~ IrSensor:362:15: error: 'class IRsend' has no member named 'sendAiwaRCT501'; did you mean 'sendRC5'? irsend.sendAiwaRCT501(pIr->code.value); ^~~~~~~~~~~~~~ sendRC5 IrSensor:364:83: error: 'MITSUBISHI' was not declared in this scope else if (pIr->code.type == LG || pIr->code.type == SANYO || pIr->code.type == MITSUBISHI) { ^~~~~~~~~~ /home/adams-pc/Arduino/IrSensor/IrSensor.ino: In function 'void dump(decode_results*)': IrSensor:419:43: error: 'USECPERTICK' was not declared in this scope Serial.print(results->rawbuf[i]*USECPERTICK, DEC); ^~~~~~~~~~~ IrSensor:422:49: error: 'USECPERTICK' was not declared in this scope Serial.print(-(int)results->rawbuf[i]*USECPERTICK, DEC); ^~~~~~~~~~~ exit status 1 'AIWA_RC_T501' was not declared in this scopeAm I missing something?
@bollarcreets, I am afraid that the script has never been adapted to the evolution of the IRRemote library.
If you take library version 2.2.3, the script will compile.If you take the source code from the latest version 2.8.1 you will also see that the typedef enums AIWA_RC_T501 and MITSUBISHI are commented out.
If you want to run this example script with the latest version of the library, you will need to analyse and understand the script in order to modify it...
-
@bollarcreets, I am afraid that the script has never been adapted to the evolution of the IRRemote library.
If you take library version 2.2.3, the script will compile.If you take the source code from the latest version 2.8.1 you will also see that the typedef enums AIWA_RC_T501 and MITSUBISHI are commented out.
If you want to run this example script with the latest version of the library, you will need to analyse and understand the script in order to modify it...
@evb said in 💬 Infrared Sender and Receiver:
If you take library version 2.2.3, the script will compile.
That does indeed work - thanks!
What's the best way to get the tutorial edited to include this information?
-
@evb said in 💬 Infrared Sender and Receiver:
If you take library version 2.2.3, the script will compile.
That does indeed work - thanks!
What's the best way to get the tutorial edited to include this information?
-
@bollarcreets I've added a note in the instructions. Please let me know if you think it could be reworded or put someplace else to make it clearer.
@mfalkvidd thanks, that change is all that's needed I think. Thanks to you and @evb for the prompt help!