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?