Problem with IR Sensor

Hi, i have a problem with a IR Sensor (vs1838), i used the library IRremote and changed "WsProgram" to "Arduino.h". But I can't get it to work, i conect the right pin of the sensor at voltage (5v), middel pin at ground and left pin at Arduino Digital Pin number 0.
I tested with public codes but i can't get it work.

Sorry with my english and hope you can help me.

Regards :slight_smile:

and left pin at Arduino Digital Pin number 0.

Why are you connecting the device to the hardware serial pin? How do you then KNOW it doesn't work? Where IS your code that you were supposed to have posted?

I did not say that the code does not work, I said that i don't get it to work. i used this code:

#include <IRremote.h>

int RECV_PIN = 10;

IRrecv irrecv(RECV_PIN);

decode_results results;

void setup()
{
  Serial.begin(9600);
  irrecv.enableIRIn(); // Start the receiver
}

void loop() {
  if (irrecv.decode(&results)) {
    Serial.println(results.value, HEX);
    irrecv.resume(); // Receive the next value
  }
}

and Connection by guiding this image:

Thanks for responding so quickly.

i conect the right pin of the sensor at voltage (5v), middel pin at ground and left pin at Arduino Digital Pin number 0.

So, this statement is nonsense? It does not agree with the picture.

int RECV_PIN = 10;

The picture says that the receiver is connected to pin 2.

I know, i changed the reciver pin in my code, but Why does not agree with the image?. The only difference is the reciver pin.