Need help with expected primary-expression before ',' token

Hey i need help with my code I can't figure out what is the problem

#include <IRremote.h>
#define ir_recive

const int LED = 3;
const byte interruptPin = 3;
int BUTTONstate = 0;

IRrecv irrecv(interruptPin);

decode_results results;

void setup()
{
pinMode(LED, OUTPUT);
pinMode(interruptPin, INPUT_PULLUP);
Serial.begin(9600);
attachInterrupt(digitalPinToInterrupt(interruptPin), ir_recive, CHANGE);
irrecv.enableIRIn(); // Start the receiver

}

void loop() {

}
{void ir_recive(){
while(irrecv.decode(&results)){
if (results.value == )
{
digitalWrite(LED, HIGH);
}
else{
digitalWrite(LED, LOW);
}
Serial.println(results.value, HEX);
irrecv.resume();
}
}

Hi @adkollar06
your code has 3 errors:

  1. line 2 #define ir_recive . delete this line.
  2. line 25 { void ir_recive() { Delete this symbol at the beginning of the line --->>>> "{".
  3. Line 27, if (results.value == ) is missing something after the "== "
1 Like

+1 for proper posting of the code. Otherwise we can’t know if boo-boos like above came from you brain or the code got mangled somehow between you and us.

a7

Thanks everybody for the help sorry for incorrectly posting. This is my first post.