Go Down

Topic: IR Remote library errors (Read 5385 times) previous topic - next topic

encryptor

I've just imported the IRRemote library, but am having trouble using it.  It first complains about IRremoteInt.h when compiling.

Code: [Select]

In file included from ir_remote_rgb_led.cpp:12:
C:\arduino-1.0.1\libraries\IRremote/IRremoteInt.h:87: error: 'uint8_t' does not name a type
C:\arduino-1.0.1\libraries\IRremote/IRremoteInt.h:88: error: 'uint8_t' does not name a type
C:\arduino-1.0.1\libraries\IRremote/IRremoteInt.h:89: error: 'uint8_t' does not name a type
C:\arduino-1.0.1\libraries\IRremote/IRremoteInt.h:92: error: 'uint8_t' does not name a type


Then if I comment out that library, which leaves IRremote.h I will get this complaint:

Code: [Select]

In file included from C:\arduino-1.0.1\libraries\IRremote\IRremote.cpp:13:
C:\arduino-1.0.1\libraries\IRremote\/IRremoteInt.h:87: error: 'uint8_t' does not name a type
C:\arduino-1.0.1\libraries\IRremote\/IRremoteInt.h:88: error: 'uint8_t' does not name a type
C:\arduino-1.0.1\libraries\IRremote\/IRremoteInt.h:89: error: 'uint8_t' does not name a type
C:\arduino-1.0.1\libraries\IRremote\/IRremoteInt.h:92: error: 'uint8_t' does not name a type
C:\arduino-1.0.1\libraries\IRremote\IRremote.cpp: In member function 'void IRsend::mark(int)':
C:\arduino-1.0.1\libraries\IRremote\IRremote.cpp:173: error: 'delayMicroseconds' was not declared in this scope
C:\arduino-1.0.1\libraries\IRremote\IRremote.cpp: In member function 'void IRsend::space(int)':
C:\arduino-1.0.1\libraries\IRremote\IRremote.cpp:181: error: 'delayMicroseconds' was not declared in this scope
C:\arduino-1.0.1\libraries\IRremote\IRremote.cpp: In member function 'void IRsend::enableIROut(int)':
C:\arduino-1.0.1\libraries\IRremote\IRremote.cpp:200: error: 'OUTPUT' was not declared in this scope
C:\arduino-1.0.1\libraries\IRremote\IRremote.cpp:200: error: 'pinMode' was not declared in this scope
C:\arduino-1.0.1\libraries\IRremote\IRremote.cpp:201: error: 'LOW' was not declared in this scope
C:\arduino-1.0.1\libraries\IRremote\IRremote.cpp:201: error: 'digitalWrite' was not declared in this scope
C:\arduino-1.0.1\libraries\IRremote\IRremote.cpp: In constructor 'IRrecv::IRrecv(int)':
C:\arduino-1.0.1\libraries\IRremote\IRremote.cpp:217: error: 'volatile struct irparams_t' has no member named 'recvpin'
C:\arduino-1.0.1\libraries\IRremote\IRremote.cpp:218: error: 'volatile struct irparams_t' has no member named 'blinkflag'
C:\arduino-1.0.1\libraries\IRremote\IRremote.cpp: In member function 'void IRrecv::enableIRIn()':
C:\arduino-1.0.1\libraries\IRremote\IRremote.cpp:241: error: 'volatile struct irparams_t' has no member named 'rcvstate'
C:\arduino-1.0.1\libraries\IRremote\IRremote.cpp:242: error: 'volatile struct irparams_t' has no member named 'rawlen'
C:\arduino-1.0.1\libraries\IRremote\IRremote.cpp:246: error: 'volatile struct irparams_t' has no member named 'recvpin'
C:\arduino-1.0.1\libraries\IRremote\IRremote.cpp:246: error: 'INPUT' was not declared in this scope
C:\arduino-1.0.1\libraries\IRremote\IRremote.cpp:246: error: 'pinMode' was not declared in this scope
C:\arduino-1.0.1\libraries\IRremote\IRremote.cpp: In member function 'void IRrecv::blink13(int)':
C:\arduino-1.0.1\libraries\IRremote\IRremote.cpp:252: error: 'volatile struct irparams_t' has no member named 'blinkflag'
C:\arduino-1.0.1\libraries\IRremote\IRremote.cpp:254: error: 'OUTPUT' was not declared in this scope
C:\arduino-1.0.1\libraries\IRremote\IRremote.cpp:254: error: 'pinMode' was not declared in this scope
C:\arduino-1.0.1\libraries\IRremote\IRremote.cpp: In function 'void __vector_9()':
C:\arduino-1.0.1\libraries\IRremote\IRremote.cpp:268: error: 'volatile struct irparams_t' has no member named 'recvpin'
C:\arduino-1.0.1\libraries\IRremote\IRremote.cpp:268: error: 'digitalRead' was not declared in this scope
C:\arduino-1.0.1\libraries\IRremote\IRremote.cpp:271: error: 'volatile struct irparams_t' has no member named 'rawlen'
C:\arduino-1.0.1\libraries\IRremote\IRremote.cpp:273: error: 'volatile struct irparams_t' has no member named 'rcvstate'
C:\arduino-1.0.1\libraries\IRremote\IRremote.cpp:275: error: 'volatile struct irparams_t' has no member named 'rcvstate'
C:\arduino-1.0.1\libraries\IRremote\IRremote.cpp:284: error: 'volatile struct irparams_t' has no member named 'rawlen'
C:\arduino-1.0.1\libraries\IRremote\IRremote.cpp:285: error: 'volatile struct irparams_t' has no member named 'rawlen'
C:\arduino-1.0.1\libraries\IRremote\IRremote.cpp:287: error: 'volatile struct irparams_t' has no member named 'rcvstate'
C:\arduino-1.0.1\libraries\IRremote\IRremote.cpp:293: error: 'volatile struct irparams_t' has no member named 'rawlen'
C:\arduino-1.0.1\libraries\IRremote\IRremote.cpp:295: error: 'volatile struct irparams_t' has no member named 'rcvstate'
C:\arduino-1.0.1\libraries\IRremote\IRremote.cpp:300: error: 'volatile struct irparams_t' has no member named 'rawlen'
C:\arduino-1.0.1\libraries\IRremote\IRremote.cpp:302: error: 'volatile struct irparams_t' has no member named 'rcvstate'
C:\arduino-1.0.1\libraries\IRremote\IRremote.cpp:310: error: 'volatile struct irparams_t' has no member named 'rcvstate'
C:\arduino-1.0.1\libraries\IRremote\IRremote.cpp:321: error: 'volatile struct irparams_t' has no member named 'blinkflag'
C:\arduino-1.0.1\libraries\IRremote\IRremote.cpp:323: error: 'B00100000' was not declared in this scope
C:\arduino-1.0.1\libraries\IRremote\IRremote.cpp:326: error: 'B11011111' was not declared in this scope
C:\arduino-1.0.1\libraries\IRremote\IRremote.cpp: In member function 'void IRrecv::resume()':
C:\arduino-1.0.1\libraries\IRremote\IRremote.cpp:332: error: 'volatile struct irparams_t' has no member named 'rcvstate'
C:\arduino-1.0.1\libraries\IRremote\IRremote.cpp:333: error: 'volatile struct irparams_t' has no member named 'rawlen'
C:\arduino-1.0.1\libraries\IRremote\IRremote.cpp: In member function 'int IRrecv::decode(decode_results*)':
C:\arduino-1.0.1\libraries\IRremote\IRremote.cpp:343: error: 'volatile struct irparams_t' has no member named 'rawlen'
C:\arduino-1.0.1\libraries\IRremote\IRremote.cpp:344: error: 'volatile struct irparams_t' has no member named 'rcvstate'
C:\arduino-1.0.1\libraries\IRremote\IRremote.cpp: In member function 'long int IRrecv::decodeNEC(decode_results*)':
C:\arduino-1.0.1\libraries\IRremote\IRremote.cpp:392: error: 'volatile struct irparams_t' has no member named 'rawlen'
C:\arduino-1.0.1\libraries\IRremote\IRremote.cpp:400: error: 'volatile struct irparams_t' has no member named 'rawlen'
C:\arduino-1.0.1\libraries\IRremote\IRremote.cpp: In member function 'long int IRrecv::decodeSony(decode_results*)':
C:\arduino-1.0.1\libraries\IRremote\IRremote.cpp:433: error: 'volatile struct irparams_t' has no member named 'rawlen'
C:\arduino-1.0.1\libraries\IRremote\IRremote.cpp:443: error: 'volatile struct irparams_t' has no member named 'rawlen'
C:\arduino-1.0.1\libraries\IRremote\IRremote.cpp: In member function 'long int IRrecv::decodeRC5(decode_results*)':
C:\arduino-1.0.1\libraries\IRremote\IRremote.cpp:518: error: 'volatile struct irparams_t' has no member named 'rawlen'
C:\arduino-1.0.1\libraries\IRremote\IRremote.cpp:529: error: 'volatile struct irparams_t' has no member named 'rawlen'


How do I fix these errors to use the IRremote libraries?? =(
peace*&^

PaulS

Quote
I've just imported the IRRemote library

Which library? What version of the IDE are you using? If it is later than 1.0, I suggest you find and install that version. It knows that missing include files are fatal. Later versions somehow think that the library will magically appear before the compiler get going.

encryptor

where is the best place to download the ir remote library?  I'm using Arduino 1.0.1   :(
peace*&^

PaulS

Quote
where is the best place to download the ir remote library?

Do you usually answer a question with a question?

Quote
I'm using Arduino 1.0.1

That's too bad.

dc42

In file ir_remote_rgb_led.cpp, try putting #include "Arduino.h" before your #include of the IR library.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

encryptor

#5
Dec 10, 2012, 06:56 am Last Edit: Dec 10, 2012, 06:58 am by encryptor Reason: 1

Quote
where is the best place to download the ir remote library?

Do you usually answer a question with a question?

Quote
I'm using Arduino 1.0.1

That's too bad.


I believe your question had the answer in it already, which is why I don't understand you asking "which library?" when you quoted IR Remote Library.  I'm looking for the IR remote library.  Ok.. why is using Arduino 1.0.1 too bad?  What are you using and how is that better?  Thanks!
peace*&^

PaulS

The problem is with you use of the definitive article - the IR Remote library - as if there was only one. There may be only one widely used one. There may only be one that actually works. But, I'm quite certain that there is not only one.

You said you downloaded the library, and I asked which one. The simplest thing for you to have done was posted a link, not argue about.

Quote
Ok.. why is using Arduino 1.0.1 too bad?  What are you using and how is that better?

I have 0022, 1.0.0, 1.0.1, and 1.0.2 installed. I use 1.0.1 most of the time, because I haven't investigated what improvements were made in 1.0.2. I already explained what issues were introduced in 1.0.1, and why you should also have a copy of 1.0.0 installed.

encryptor

I've added the IR Library from another source - https://github.com/shirriff/Arduino-IRremote . Plus I added #include "Arduino.h" as suggested.  Now I'm getting this error:

Quote

IRremote\IRremote.cpp.o: In function `MATCH(int, int)':
/IRremoteInt.h:176: multiple definition of `MATCH(int, int)'
ir_remote_rgb_led.cpp.o:C:\arduino-1.0.1\libraries\IRremote/IRremoteInt.h:176: first defined here
IRremote\IRremote.cpp.o: In function `MATCH_MARK(int, int)':
/IRremoteInt.h:177: multiple definition of `MATCH_MARK(int, int)'
ir_remote_rgb_led.cpp.o:C:\arduino-1.0.1\libraries\IRremote/IRremoteInt.h:177: first defined here
IRremote\IRremote.cpp.o: In function `MATCH_SPACE(int, int)':
/IRremoteInt.h:178: multiple definition of `MATCH_SPACE(int, int)'
ir_remote_rgb_led.cpp.o:C:\arduino-1.0.1\libraries\IRremote/IRremoteInt.h:178: first defined here
peace*&^

PaulS

Quote
Plus I added #include "Arduino.h" as suggested.

Added it where?

Quote
ir_remote_rgb_led.cpp.o:C:\arduino-1.0.1\libraries\IRremote/IRremoteInt.h

User downloaded libraries do NOT go in the core library folder.

What sketch are you trying to compile?

dc42

Your sketch appears to be including two different versions of IRremoteInt.h, one from your sketch and one from the IRremote.cpp library file. When you downloaded the IR library from a different source, I think you didn't remove the old one completely.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

encryptor

I added Arduino.h at the top of my sketch where I have the IRremote include statements.  I don't think I have another location for user downloaded libraries.  C:\Users\encryptor\Documents\Arduino just has all my sketches.  Should there be a library folder there?  Attached is the code.



Quote
Plus I added #include "Arduino.h" as suggested.

Added it where?

Quote
ir_remote_rgb_led.cpp.o:C:\arduino-1.0.1\libraries\IRremote/IRremoteInt.h

User downloaded libraries do NOT go in the core library folder.

What sketch are you trying to compile?




peace*&^

PaulS

Quote
Should there be a library folder there?

A libraries folder, yes.


PaulS

Remove the Arduino.h include, and the IRRemoteInt.h include. They get included in other ways. Your including the IRRemoteInt.h file is what is causing the duplicate define messages.

encryptor

I got the IR receiver picking up low frequencies from my Sony RM-EZ4 remote.  I see the Sony TV code 8201 gives me decimal readings in the Serial monitor.  I see the Sony Cable box code 3101 gives me Hex readings.  I want to control the color by button pressed.  Can I program specific color to remote buttons?  Which Sony protocol should I use?  Does it matter much between TV and cable box?
peace*&^

Go Up