Hi! I'm a newbie to infrared, i wasn't sure which section to put this under but since it is on the programming side of infrared i thought i would put it under that.
#include <IRremote.h>
int IRpin = 11;
IRrecv irrecv(IRpin);
decode_results results;
void setup()
{
Serial.begin(9600);
irrecv.enableIRIn();
}
void loop()
{
if (irrecv.decode(&results))
{
Serial.println(results.value, DEC);
irrecv.resume();
}
}
This is for a car mp3 controller and i believe it converts hexadecimal to decimal when a button is pressed. However, lets say i wanted it so that when i press the button labelled 1 which in decimal form is 16724175, how would i go about detecting that the button has been pressed and then printing "Button Pressed"? If anyone could help it would be great!
Also, buttons in hexadecimal.