IR receiver HEX value 0

Hello!

I got an IR receiver with an IR remote control but when I tried to connect them to Arduino UNO and read the HEX value in serial monitor it returns value 0.
The code is :

#include <IRremote.h>
int RECV_PIN = 7;
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 }
}

Where is the problem?
IR receiver connections:

IR RECEIVER | ARDUINO
1(OUT) PIN7
2(GND) GND on breadboard(connected with arduino GND)
3(VCC) 5V on breadoboard(connected to arduino 5V)

IR receiver photo + pins
https://images.app.goo.gl/5LXWx43ZBaXEXxPo9

When I press any button on remote it returns 0.
Where should be the problem? It’s broken?

Let's see your wiring.

Make sure your "Serial Monitor" is set to 9600 baud ;).

This seems similar to this issue:

I’m beginning to suspect a library error due to a recent change. Did you load or update your copy of the IR library recently?

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.