Unable to read hex code form remote

in the last month Arduino was able give hex code when i pressed button on remote but now it is gives nothing can anyone help me to fix this

this is the code

#include <IRremote.h>
#include <SPI.h>

IRrecv ir(6);

void setup(){
  Serial.begin(9600);
  ir.enableIRIn();
  
}

void loop(){
  if (ir.decode()) {
    unsigned long long int q = ir.decodedIRData.decodedRawData;
    ir.resume();
    Serial.println((unsigned)q);
  }
}

Have you changed the code since it worked last ?

If the code has not changed then you have a hardware/wiring problem

Maybe new batteries in the remote....

Point your remote directly at your phone camera. You will see the IR LED pulse if it is working.

Yes, the problem was with hardware i.e ir sensor
Now it's working

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