Questions with IR remote

Hi,

I want to use my arduino UNO to make a decode device. I found an example code and a some steps which can teach me how to build. In those steps, it told me that I need to download a folder called IRremote and install it in this route /Users/username/Documents/Arduino/libraries.

When I finished write the coding and tried to verify, Arduino IDE said that 'IRrecv' does not name a type.

The following is the code I wrote

#include<IRremote.h>

const int irReceiverPin = 2;

IRrecv irrecv(ivReceiverPin);
decode_results results;
void setup()
{
  Serial.begin(9600);
  irrecv.enableIRIn();
}
void loop()
{
  if (irrecv.decode(&results){
    Serial.print("ircode");
    Serial.print(results.value, HEX);
    Serial.println(results.bits);
    irrecv.resume();
  }
}

The following is the message which came from arduino IDE

/Users/TommyHu/Downloads/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=103 -I/Users/TommyHu/Downloads/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino -I/Users/TommyHu/Downloads/Arduino.app/Contents/Resources/Java/hardware/arduino/variants/standard /var/folders/40/qp_yf07j11z_nb9qwcs2fgd40000gn/T/build6216189189652123984.tmp/sketch_mar03a.cpp -o /var/folders/40/qp_yf07j11z_nb9qwcs2fgd40000gn/T/build6216189189652123984.tmp/sketch_mar03a.cpp.o 
sketch_mar03a.ino:2:21: warning: IRremote.h: No such file or directory
sketch_mar03a.ino:2:21: warning: IRremote.h: No such file or directory
sketch_mar03a:6: error: 'IRrecv' does not name a type
sketch_mar03a:6: error: 'IRrecv' does not name a type
sketch_mar03a:7: error: 'decode_results' does not name a type
sketch_mar03a:7: error: 'decode_results' does not name a type
sketch_mar03a.ino: In function 'void setup()':
sketch_mar03a:11: error: 'irrecv' was not declared in this scope
sketch_mar03a.ino: In function 'void setup()':
sketch_mar03a:11: error: 'irrecv' was not declared in this scope
sketch_mar03a.ino: In function 'void loop()':
sketch_mar03a.ino: In function 'void loop()':
sketch_mar03a:15: error: 'irrecv' was not declared in this scope
sketch_mar03a:15: error: 'irrecv' was not declared in this scope
sketch_mar03a:15: error: 'results' was not declared in this scope
sketch_mar03a:15: error: 'results' was not declared in this scope
sketch_mar03a:15: error: expected `)' before '{' token
sketch_mar03a:15: error: expected `)' before '{' token
sketch_mar03a:21: error: expected primary-expression before '}' token
sketch_mar03a:21: error: expected primary-expression before '}' token
sketch_mar03a:21: error: expected `;' before '}' token
sketch_mar03a:21: error: expected `;' before '}' token

My OS: mac os x 10.8.2
Arduino IDE edition: 1.0.3
Arduino board type: UNO

The path "/Users/username/Documents/Arduino/libraries" looks like a Windows path. Does your Mac use the same file structure?

Hi,

Thanks for your reply.

I copied the route from my arduino IDE.

The photo is what showed on my IDE.

please teach which route is the right one to install folder like IRreomte.

Arduino IDE.tiff (106 KB)