user33772: I'm trying to receive remote information with an IR receiver and this is my code:
#include <IRremote.h>

int RECV_PIN = 11;
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
  }
  delay(100);
}

I tried to upload this to Arduino and it says:
exit status 1
redefinition of 'int RECV_PIN'

How can I fix this?

user16085: Apparently the name RECV_PIN is used somewhere else, presumably in IRRemote.h -- although not in any version of it I can find.  Anyway, just change the name of RECV_PIN to something which doesn't conflict.
For example:
int MY_RECV_PIN = 11;
IRrecv irrecv(MY_RECV_PIN);


33772: <p>I'm trying to receive remote information with an IR receiver and this is my code:</p>

<pre><code>#include &lt;IRremote.h&gt;

int RECV_PIN = 11;
IRrecv irrecv(RECV_PIN);
decode_results results;

void setup() {
  Serial.begin(9600);
  irrecv.enableIRIn(); // Start the receiver
}

void loop() {
  if (irrecv.decode(&amp;results)) {
    Serial.println(results.value, HEX);
    irrecv.resume(); // Receive the next value
  }
  delay(100);
}
</code></pre>

<p>I tried to upload this to Arduino and it says:</p>

<pre><code>exit status 1
redefinition of 'int RECV_PIN'
</code></pre>

<p>How can I fix this?</p>
 16085: <p>Apparently the name <code>RECV_PIN</code> is used somewhere else, presumably in <code>IRRemote.h</code> -- although not in any version of it I can find.  Anyway, just change the name of <code>RECV_PIN</code> to something which doesn't conflict.</p>

<p>For example:</p>

<pre><code>int MY_RECV_PIN = 11;
IRrecv irrecv(MY_RECV_PIN);
</code></pre>
