Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 8 of 8

Thread: IRremote trouble: 'IRsend' does not name a type

Hybrid View

  1. #1
    Junior Member Mneventh's Avatar
    Join Date
    Jan 2014
    Posts
    6

    IRremote trouble: 'IRsend' does not name a type

    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);
    }

  2. #2
    Junior Member Mneventh's Avatar
    Join Date
    Jan 2014
    Posts
    6
    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?

  3. #3
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    21,473
    Oh no, looks like the RobotIRremote library is causing a conflict.

    Look in your arduino libraries folder. Delete RobotIRremote. That'll probably fix things.

  4. #4
    Junior Member Mneventh's Avatar
    Join Date
    Jan 2014
    Posts
    6
    That was exactly the problem, thanks so much Paul!

    Now to figure out the codes to send..

  5. #5
    Junior Member
    Join Date
    Nov 2017
    Posts
    2

    Question help

    Quote Originally Posted by Mneventh View Post
    That was exactly the problem, thanks so much Paul!

    Now to figure out the codes to send..
    Where do I delete the library from I can't find it?

  6. #6
    Junior Member
    Join Date
    Nov 2017
    Posts
    2
    where do I find the library to delete it I cant find it.

  7. #7
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    6,335
    Quote Originally Posted by DC3192 View Post
    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

  8. #8
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    21,473
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •