user4452: I would like to use my Attiny85 as an remote controlled relay switch.
I have already tested the sketch on my Atmega328 and it worked.
Now I wanted to burn the sketch on my Attiny85 using ArduinoISP but I get the following error in the ArduinoIDE:
sketch_dec25a.ino: In function ‘void setup()’:
sketch_dec25a:13: error: ‘class RCSwitch’ has no member named ‘enableReceive’
sketch_dec25a.ino: In function ‘void loop()’:
sketch_dec25a:20: error: ‘class RCSwitch’ has no member named ‘available’
sketch_dec25a:21: error: ‘class RCSwitch’ has no member named ‘getReceivedValue’
sketch_dec25a:22: error: ‘class RCSwitch’ has no member named ‘getReceivedValue’
sketch_dec25a:25: error: ‘class RCSwitch’ has no member named ‘resetAvailable’

That's my code:
#include <SoftwareSerial.h>
#include <RCSwitch.h>

int RELAY_PIN = 2;

RCSwitch mySwitch = RCSwitch();
SoftwareSerial mySerial(1, 3); // RX, TX

void setup()  
{
  pinMode(RELAY_PIN, OUTPUT);
  mySwitch.enableReceive(0);  // Receiver on inerrupt 0 => that is pin #2
  mySerial.begin(9600);
  mySerial.println("Hello, world?");
}

void loop() // run over and over
{
  if (mySwitch.available()) {
    Serial.println(mySwitch.getReceivedValue());
    if(mySwitch.getReceivedValue() == 1234567){
      digitalWrite(RELAY_PIN, HIGH);
    }
    mySwitch.resetAvailable();
  }
}

I am using these cores: https://code.google.com/p/arduino-tiny/
I am using the SoftwareSerial just for debugging.
Sorry for my bad english and thanks for your help!

user30666: I have tested with Digispark ATtiny85 and https://github.com/sui77/rc-switch work perfect
just comment #define RCSwitchDisableReceiving
than use in setup code enableReceive(0); and external pin 7 PB2(int0) as RF source
Or you can use other software pin interrupt
in setup:
PCMSK |= (1<<PCINT0);//here pin number
GIMSK |= (1<<PCIE);
interrupt function

ISR(PCINT0_vect) {
  rd.handleInterrupt(); // you need also put handleInterrupt() in public section in RCSwitch.h
}

user84: The issue you face is that RCSwitch does not seem to support receive mode for ATtiny.
This is what you can find in RCSwitch.h:
// At least for the ATTiny X4/X5, receiving has to be disabled due to
// missing libm depencies (udivmodhi4)
#if defined( __AVR_ATtinyX5__ ) or defined ( __AVR_ATtinyX4__ )
#define RCSwitchDisableReceiving
#endif

Then all methods related to receptions are not defined in RCSwitch class for ATtiny MCUs:
#if not defined( RCSwitchDisableReceiving )
void enableReceive(int interrupt);
void enableReceive();
void disableReceive();
bool available();
void resetAvailable();

unsigned long getReceivedValue();
unsigned int getReceivedBitlength();
unsigned int getReceivedDelay();
unsigned int getReceivedProtocol();
unsigned int* getReceivedRawdata();
#endif

I am really not sure if there is a way to work around it, I have not looked at the code in RCSwitch.cpp. 
Maybe you best option would be to find another RC library.
For instance, if you can use Infra-Red RC, then there are libraries out there that could work for ATtiny:
https://github.com/shirriff/Arduino-IRremote

4452: <p>I would like to use my Attiny85 as an remote controlled relay switch.
I have already tested the sketch on my Atmega328 and it worked.
Now I wanted to burn the sketch on my Attiny85 using ArduinoISP but I get the following error in the ArduinoIDE:</p>

<pre><code>sketch_dec25a.ino: In function ‘void setup()’:
sketch_dec25a:13: error: ‘class RCSwitch’ has no member named ‘enableReceive’
sketch_dec25a.ino: In function ‘void loop()’:
sketch_dec25a:20: error: ‘class RCSwitch’ has no member named ‘available’
sketch_dec25a:21: error: ‘class RCSwitch’ has no member named ‘getReceivedValue’
sketch_dec25a:22: error: ‘class RCSwitch’ has no member named ‘getReceivedValue’
sketch_dec25a:25: error: ‘class RCSwitch’ has no member named ‘resetAvailable’
</code></pre>

<p>That's my code:</p>

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

int RELAY_PIN = 2;

RCSwitch mySwitch = RCSwitch();
SoftwareSerial mySerial(1, 3); // RX, TX

void setup()  
{
  pinMode(RELAY_PIN, OUTPUT);
  mySwitch.enableReceive(0);  // Receiver on inerrupt 0 =&gt; that is pin #2
  mySerial.begin(9600);
  mySerial.println("Hello, world?");
}

void loop() // run over and over
{
  if (mySwitch.available()) {
    Serial.println(mySwitch.getReceivedValue());
    if(mySwitch.getReceivedValue() == 1234567){
      digitalWrite(RELAY_PIN, HIGH);
    }
    mySwitch.resetAvailable();
  }
}
</code></pre>

<p>I am using these cores: <a href="https://code.google.com/p/arduino-tiny/" rel="nofollow">https://code.google.com/p/arduino-tiny/</a></p>

<p>I am using the SoftwareSerial just for debugging.
Sorry for my bad english and thanks for your help!</p>
 30666: <p>I have tested with Digispark ATtiny85 and <a href="https://github.com/sui77/rc-switch" rel="nofollow noreferrer">https://github.com/sui77/rc-switch</a> work perfect</p>

<p>just comment <code>#define RCSwitchDisableReceiving</code>
than use in setup code <code>enableReceive(0);</code> and external pin 7 PB2(int0) as RF source</p>

<p>Or you can use other software pin interrupt</p>

<p>in setup:<code>
PCMSK |= (1&lt;&lt;PCINT0);//here pin number
GIMSK |= (1&lt;&lt;PCIE);</code></p>

<p>interrupt function
<code>
ISR(PCINT0_vect) {
  rd.handleInterrupt(); // you need also put handleInterrupt() in public section in RCSwitch.h
}</code></p>
 84: <p>The issue you face is that RCSwitch does not seem to support receive mode for ATtiny.</p>

<p>This is what you can find in <code>RCSwitch.h</code>:</p>

<pre><code>// At least for the ATTiny X4/X5, receiving has to be disabled due to
// missing libm depencies (udivmodhi4)
#if defined( __AVR_ATtinyX5__ ) or defined ( __AVR_ATtinyX4__ )
#define RCSwitchDisableReceiving
#endif
</code></pre>

<p>Then all methods related to receptions are not defined in <code>RCSwitch</code> class for ATtiny MCUs:</p>

<pre><code>#if not defined( RCSwitchDisableReceiving )
void enableReceive(int interrupt);
void enableReceive();
void disableReceive();
bool available();
void resetAvailable();

unsigned long getReceivedValue();
unsigned int getReceivedBitlength();
unsigned int getReceivedDelay();
unsigned int getReceivedProtocol();
unsigned int* getReceivedRawdata();
#endif
</code></pre>

<p>I am really not sure if there is a way to work around it, I have not looked at the code in <code>RCSwitch.cpp</code>. </p>

<p>Maybe you best option would be to find another RC library.</p>

<p>For instance, if you can use Infra-Red RC, then there are libraries out there that could work for ATtiny:</p>

<p><a href="https://github.com/shirriff/Arduino-IRremote" rel="nofollow">https://github.com/shirriff/Arduino-IRremote</a></p>
