IR sensor

Hello,
I have a problem with my IR receiver sensor.
The model is vs1838b, and it is not working.
I tried the example code of the IRremote library “IRrecvDemo.ino”:

#include <IRremote.h>

int RECV_PIN = 11;

IRrecv irrecv(RECV_PIN);

decode_results results;

void setup()
{
  Serial.begin(9600);
  // In case the interrupt driver crashes on setup, give a clue
  // to the user what's going on.
  Serial.println("Enabling IRin");
  irrecv.enableIRIn(); // Start the receiver
  Serial.println("Enabled IRin");
}

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

and this is not working when I point the remote to the sensor.
I tried adding to the main loop println(digitalRead(RECV_PIN)); but it output a square wave. and the strange part is it kept giving me the same output even when I removed the sensor from the bread board?

what is not working? do anyone had this problem?

Thenk you for ANY help,
Arad.

I tried your code on my Uno and I get the expected result with my remote. Have you checked that your remote is actually transmitting? Cell phone and digital cameras are often sensitive to IR light. Point the remote at your camera and press some buttons. You should observe a bluish light.

If the remote is transmitting, post a picture of your wiring.