IR Remote receiving 0's

Hi, I have had this problem for a while and I've been unable to fix it. My arduino nano is giving me 0's in the serial monitor. I am using the default IRrecvdemo sketch. I am using a VS1838B infrared receiver.

|500x312

How would I fix this?

Do you know the protocol of the remote that you are using? Have you tried the IRrecvDump example to see which protocol the remote is using? Not all protocols are supported by the library.

Thanks! Unfortunately I forgot to mention that I have tried multiple remotes and all of them did work at one point.

|500x312

"all of them did work at one point."

Isn't that special, I wonder what happened ;)

.

LarryD: "all of them did work at one point."

Isn't that special, I wonder what happened ;)

.

What are you referring to? What did I do? It is wired correctly.

Usually stuff like this is do to burning out a component by shorting it while powered.

.

LarryD: Usually stuff like this is do to burning out a component by shorting it while powered.

.

I have tried multiple new IR receivers so in no way could it be a burnt out IR receiver. I am receiving something on the serial monitor when I press a button so that shows that it hasn't been shorted in any way.

So the remotes use to work, but they don't now. You are 100% sure the code hasn't been changed. You know the receiver(s) is/are okay. Your wiring hasn't changed. The batteries in the remotes are good.

That does not leave much.

I'll try your code here and report back.

.

LarryD: So the remotes use to work, but they don't now. You are 100% sure the code hasn't been changed. You know the receiver(s) is/are okay. Your wiring hasn't changed. The batteries in the remotes are good.

That does not leave much.

I'll try your code here and report back. .

Thanks. It is the default code by Shirriff.

This code works well here, I am using pin D2 as receive.

Does it work there?

/*
   IRremote: IRrecvDemo - demonstrates receiving IR codes with IRrecv
   An IR detector/demodulator must be connected to the input RECV_PIN.
   Version 0.1 July, 2009
   Copyright 2009 Ken Shirriff
   http://arcfn.com
*/

#include <IRremote.h>

int RECV_PIN = 2;

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
  }
  delay(100);
}

LarryD:
This code works well here, I am using pin D2 as receive.

Does it work there?

/*

IRremote: IRrecvDemo - demonstrates receiving IR codes with IRrecv
  An IR detector/demodulator must be connected to the input RECV_PIN.
  Version 0.1 July, 2009
  Copyright 2009 Ken Shirriff
  http://arcfn.com
*/

#include <IRremote.h>

int RECV_PIN = 2;

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
  }
  delay(100);
}

I just got it working! I reinstalled the library a couple of times. Thanks so much for the help!

You are welcome.

You are an expert now.

.