sui77 / rc-switch

Arduino lib to operate 433/315Mhz devices like power outlet sockets.
1.9k stars 658 forks source link

Does not seems to work with the new Attiny Series. (tinyAVR 1) #377

Closed HAMXAZAHID closed 3 years ago

HAMXAZAHID commented 3 years ago

I ran the ReceiveDemo_Simple on the Arduino UNO and it works flawlessly. (Thanks a lot for that.) Then I tried that same example on my actual board with the Attiny1614. (new tinyAVR series 1). And it does not seems to work. What can I do to make this library work with the new Attiny Seires.

The only thing that I changed in the example was the interrupt pin number from 0 (For the UNO) to 5 (For the Attiny).

It does not seems to execute the if (mySwitch.available()). Because I put a few extra lines in there to turn on an LED if it gets executed.

`#include

RCSwitch mySwitch = RCSwitch();

void setup() { Serial.begin(9600); pinMode(8, OUTPUT); mySwitch.enableReceive(5); }

void loop() { if (mySwitch.available()) { Serial.print( mySwitch.getReceivedValue() ); digitalWrite(8, CHANGE); mySwitch.resetAvailable(); } }`

HAMXAZAHID commented 3 years ago

It seems the issue was somewhere else because it is working in the tinyAVR series now.