I have this problem with my arduino. I want to use the NECIRrcv library, but in every scenario it gives me different errors. The problem is that when I try to upload the sketch, it gives loads of problems witch I will put here.
The only Thing that is the same every time is the following sketch and the board: The Arduino Duemilanove.
// look for IR codes and print them as they are received
#include <NECIRrcv.h>
#define IRPIN 4 // pin that IR detector is connected to
NECIRrcv ir(IRPIN) ;
void setup()
{
Serial.begin(9600) ;
Serial.println("NEC IR code reception") ;
ir.begin() ;
}
void loop()
{
unsigned long ircode ;
while (ir.available()) {
ircode = ir.read() ;
Serial.print("got code: 0x") ;
Serial.println(ircode,HEX) ;
}
}
Scenario 1.
Platform: Vista x64
IDE:0016
Error: something like this!(brother is playing Fallout 3 now so i cant go on that pc now!
In file included from /home/wouter/arduino-0011/hardware/cores/arduino/WProgram.h:6,
from NECIRrcv.cpp:4:
/opt/cross/lib/gcc/avr/4.1.3/../../../../avr/include/avr/signal.h:36:2: warning: #warning "This header file is obsolete. Use <avr/interrupt.h>."
/opt/cross/lib/gcc/avr/4.1.3/../../../../avr/include/stdlib.h:80: error: expected unqualified-id before 'int'
/opt/cross/lib/gcc/avr/4.1.3/../../../../avr/include/stdlib.h:80: error: expected `)' before 'int'
/opt/cross/lib/gcc/avr/4.1.3/../../../../avr/include/stdlib.h:80: error: expected `)' before 'int'
/opt/cross/lib/gcc/avr/4.1.3/../../../../avr/include/stdlib.h:111: error: expected unqualified-id before 'int'
/opt/cross/lib/gcc/avr/4.1.3/../../../../avr/include/stdlib.h:111: error: expected `)' before 'int'
/opt/cross/lib/gcc/avr/4.1.3/../../../../avr/include/stdlib.h:111: error: expected `)' before 'int'
/opt/cross/lib/gcc/avr/4.1.3/../../../../avr/include/stdlib.h:144: error: expected identifier before '(' token
/opt/cross/lib/gcc/avr/4.1.3/../../../../avr/include/stdlib.h:144: error: expected `)' before '(' token
/opt/cross/lib/gcc/avr/4.1.3/../../../../avr/include/stdlib.h:144: error: expected ',' or '...' before '(' token
/opt/cross/lib/gcc/avr/4.1.3/../../../../avr/include/stdlib.h:144: error: expected initializer before ')' token
/opt/cross/lib/gcc/avr/4.1.3/../../../../avr/include/stdlib.h:176: error: '__compar_fn_t' has not been declared
/opt/cross/lib/gcc/avr/4.1.3/../../../../avr/include/math.h:439: error: expected unqualified-id before 'double'
/opt/cross/lib/gcc/avr/4.1.3/../../../../avr/include/math.h:439: error: expected `)' before 'double'
/opt/cross/lib/gcc/avr/4.1.3/../../../../avr/include/math.h:439: error: expected `)' before 'double'
o: In function `__static_initialization_and_destruction_0(int, int)':
undefined reference to `NECIRrcv::NECIRrcv(int)'o: In function `loop':
o: In function `setup':
Scenario 2.
Platform: Vista x64
IDE:0011 (i read somewhere that it only works with 0011)
Error: The well-known "Can't find Com1" Error. And Tools->Serial Port is all greyed out. :-/
Scenario 3.
Platform: x86 Opensuse
IDE: 0011
Error:
In file included from /home/wouter/arduino-0011/hardware/cores/arduino/WProgram.h:6,
from NECIRrcv.cpp:4:
/opt/cross/lib/gcc/avr/4.1.3/../../../../avr/include/avr/signal.h:36:2: warning: #warning "This header file is obsolete. Use <avr/interrupt.h>."
/opt/cross/lib/gcc/avr/4.1.3/../../../../avr/include/stdlib.h:80: error: expected unqualified-id before 'int'
/opt/cross/lib/gcc/avr/4.1.3/../../../../avr/include/stdlib.h:80: error: expected `)' before 'int'
/opt/cross/lib/gcc/avr/4.1.3/../../../../avr/include/stdlib.h:80: error: expected `)' before 'int'
/opt/cross/lib/gcc/avr/4.1.3/../../../../avr/include/stdlib.h:111: error: expected unqualified-id before 'int'
/opt/cross/lib/gcc/avr/4.1.3/../../../../avr/include/stdlib.h:111: error: expected `)' before 'int'
/opt/cross/lib/gcc/avr/4.1.3/../../../../avr/include/stdlib.h:111: error: expected `)' before 'int'
/opt/cross/lib/gcc/avr/4.1.3/../../../../avr/include/stdlib.h:144: error: expected identifier before '(' token
/opt/cross/lib/gcc/avr/4.1.3/../../../../avr/include/stdlib.h:144: error: expected `)' before '(' token
/opt/cross/lib/gcc/avr/4.1.3/../../../../avr/include/stdlib.h:144: error: expected ',' or '...' before '(' token
/opt/cross/lib/gcc/avr/4.1.3/../../../../avr/include/stdlib.h:144: error: expected initializer before ')' token
/opt/cross/lib/gcc/avr/4.1.3/../../../../avr/include/stdlib.h:176: error: '__compar_fn_t' has not been declared
/opt/cross/lib/gcc/avr/4.1.3/../../../../avr/include/math.h:439: error: expected unqualified-id before 'double'
/opt/cross/lib/gcc/avr/4.1.3/../../../../avr/include/math.h:439: error: expected `)' before 'double'
/opt/cross/lib/gcc/avr/4.1.3/../../../../avr/include/math.h:439: error: expected `)' before 'double'
o: In function `__static_initialization_and_destruction_0(int, int)':
undefined reference to `NECIRrcv::NECIRrcv(int)'o: In function `loop':
o: In function `setup':