IRremote trouble: 'IRsend' does not name a type

Status
Not open for further replies.

Mneventh

Member
Hello!

I want to use the IRremote library to control a TV using my teensy with an infrared LED. I have set up teensyduino and loaded the blink test successfully.

I got an error when trying to use IRremote:

Code:
sketch_oct12a:4: error: 'IRsend' does not name a type
sketch_oct12a.ino: In function 'void loop()':
sketch_oct12a:10: error: 'irsend' was not declared in this scope

But class IRsend is defined in IRremote.h. Do you have any suggestions what I might try to get this working please? Thanks a lot.



This is the code I was trying to use (which is taken from the page here: http://www.pjrc.com/teensy/td_libs_IRremote.html)

Code:
#include <IRremote.h>

IRsend irsend;

void setup() {
}

void loop() {
    irsend.sendSony(0x68B92, 20);
    delay(100);
    irsend.sendSony(0x68B92, 20);
    delay(100);
    irsend.sendSony(0x68B92, 20);
    delay(300000);
}
 
I'm more used to using the teensy_loader_cli with C code, is it possible to use this library that way? Maybe that would let me workaround this include error?
 
Oh no, looks like the RobotIRremote library is causing a conflict.

Look in your arduino libraries folder. Delete RobotIRremote. That'll probably fix things.
 
where do I find the library to delete it I cant find it.
Assuming you have this issue, you should look to wherever your sketch folder is located. You have not specified anything like what type of machine. But for example on my Windows 10 machine it is located at:
C:\Users\kurte\Documents\Arduino

Obviously if your user name is not kurte, it is probably a different directory ;)

Then look the libraries subdirectory there and then delete the library Paul mentioned.

And/Or you should look where you installed Arduino and look to delete it there. That is on my 1.8.5 system I see it at:
D:\arduino-1.8.5\libraries\RobotIRremote
 
That message is more than 3 years ago.

This is no longer an issue with recent versions of Arduino & Teensyduino.

If you need help, please start a new thread. You MUST give us complete info, including the complete code you're compiling, which version of Arduino & Teensyduino you have, which board is selected, and so on. Before you post, read your message. Does it contain enough info, given clearly, so anyone reading could recreate the exact same problem on their computer? Please, put some work into writing a good question, so we can help you.
 
Status
Not open for further replies.
Back
Top