user4912: I am trying to use this example code from the RCSwitch library:
/*
  Simple example for receiving

  https://github.com/sui77/rc-switch
*/

#include <RCSwitch.h>

RCSwitch mySwitch = RCSwitch();

void setup() {
  Serial.begin(9600);
  mySwitch.enableReceive(0);  // Receiver on inerrupt 0 => that is pin #2
}

void loop() {
  if (mySwitch.available()) {
    Serial.print("Is avail");
    int value = mySwitch.getReceivedValue();

    if (value == 0) {
      Serial.print("Unknown encoding");
    } else {
      Serial.print("Received ");
      Serial.print( mySwitch.getReceivedValue() );
      Serial.print(" / ");
      Serial.print( mySwitch.getReceivedBitlength() );
      Serial.print("bit ");
      Serial.print("Protocol: ");
      Serial.println( mySwitch.getReceivedProtocol() );
    }

    mySwitch.resetAvailable();
  }
}

It seems like the mySwitch.available() is returning false, but since there seems to be no documentation for the library I don't know what it means.
So why is that?
I am trying to use this code on a A-Star 32U4 Micro, which supports Arduino code.

user4912: I think that the value of available just determine if there is a message to receive or not. 

4912: <p>I am trying to use this example code from the <a href="https://github.com/sui77/rc-switch" rel="nofollow">RCSwitch library</a>:</p>

<pre><code>/*
  Simple example for receiving

  https://github.com/sui77/rc-switch
*/

#include &lt;RCSwitch.h&gt;

RCSwitch mySwitch = RCSwitch();

void setup() {
  Serial.begin(9600);
  mySwitch.enableReceive(0);  // Receiver on inerrupt 0 =&gt; that is pin #2
}

void loop() {
  if (mySwitch.available()) {
    Serial.print("Is avail");
    int value = mySwitch.getReceivedValue();

    if (value == 0) {
      Serial.print("Unknown encoding");
    } else {
      Serial.print("Received ");
      Serial.print( mySwitch.getReceivedValue() );
      Serial.print(" / ");
      Serial.print( mySwitch.getReceivedBitlength() );
      Serial.print("bit ");
      Serial.print("Protocol: ");
      Serial.println( mySwitch.getReceivedProtocol() );
    }

    mySwitch.resetAvailable();
  }
}
</code></pre>

<p>It seems like the mySwitch.available() is returning false, but since there seems to be no documentation for the library I don't know what it means.</p>

<p>So why is that?</p>

<p>I am trying to use this code on a A-Star 32U4 Micro, which supports Arduino code.</p>
 4912: <p>I think that the value of available just determine if there is a message to receive or not. </p>
