I'm using Attiny85 and I just run the sample code of RCSwitch below, but the error occure. "Compilation error: 'class RCSwitch' has no member named 'enableReceive' "
I found same topic on this here and I can't ask anymore because it's close. did somebody can help what to on this to make it work?
my project is just a simple receiving RF remote code using ATtiny85 is more than enough than to use other Arduino boards...
// 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
and a bit later
#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
So: for ATtinyX5 and ATtinyX4, none of the receive routines are defined.
This can be easily fixed by commenting the RCSwitchDisableReceiving define. In reality, Attiny85 can used as receiver with this library. See this discussion for more detail:
I really appreciated your reply @b707. I follow there and I got this error A programmer is required to upload.
I don't know what is the programmer to be selected on attiny | ATtiny25/45/85, clock 16Mhz, Processor ATtiny85. The board also I put in the Preferences... library I downloaded on the link on their discussion. usually I use digispark and use the programmer Micronucleus but the attiny from Melis if I'm not mistaken I did not see this programmer. I try to message also their asking for help... I hope they will answer me... it seems their project was successful based on that conversation or treads...
Sorry, I know nothing about the programmer you used.
As you can see in the github, the receiver code works for others. So I think you should to test your IDE settings again.
I found that the message "A programmer is required to upload." error is due to the upload button of my IDE is not working and it will upload the conde by using the upload on the Sketch | Upload with programmer. I don't know why it happens now like this... I just re-install my IDE because I'm thinking that this issue are made of faulty IDE.