I am sending command through remote button but I am unable to detect the hex value

Hi I am using to IR Remote library to detect the signal from IR remote through IR sensor.I am getting only "0 " when I pressed the button from the IR remote.It is not giving the hex value. For you reference I am posting the code.I am using esp32 dev module for developing the code.

/*****Code/

#include <IRremote.h>
// testing code
// Define sensor pin
const int RECV_PIN = 17;

// Define IR Receiver and Results Objects
IRrecv irrecv(RECV_PIN);
decode_results results;

void setup(){
// Serial Monitor @ 115200 baud
Serial.begin(115200);
// Enable the IR Receiver
irrecv.enableIRIn();
Serial.println("WAITING FOR REMOTE");

}

void loop()
{
if (irrecv.decode(&results))
{

   Serial.println(results.value, HEX);  
    irrecv.resume();      

}
}

  1. You are missing an asterisk ( * ) before the slash ( / ) to close the comment.
  2. Please, format your code and post the formatted code to your message box using the < CODE > button... the result should look like this...
/*****Code*/  // <-- Missing the last "*" asterisk

#include <IRremote.h>
// testing code
// Define sensor pin
const int RECV_PIN = 17;

// Define IR Receiver and Results Objects
IRrecv irrecv(RECV_PIN);
decode_results results;

void setup() {
  // Serial Monitor @ 115200 baud
  Serial.begin(115200);
  // Enable the IR Receiver
  irrecv.enableIRIn();
  Serial.println("WAITING FOR REMOTE");

}

void loop()
{
  if (irrecv.decode(&results))
  {

    Serial.println(results.value, HEX);
    irrecv.resume();

  }
}

You started a topic in the Uncategorised category of the forum when its description explicitly tells you not to

Your topic has been moved to a relevant

category. Please be careful in future when deciding where to start new topics

Hi xfpd,
Thanks for your reply.I think asterik is not a problem ,while posting the code by mistakes I missed the asterisk .but corrected the code.My code is same whatever you posted .But still I am getting 0 value .

You might have a new version of IRremote.h but you are using an old version of "irrecv.decode"... I think the new library does not use the "address of/&" result. Look in the IRremote example for a simple receive sketch (IDE >> FILE >> EXAMPLES >> IRREMOTE >> (examples).