sui77 / rc-switch

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

I can not use both frequency #422

Closed nimaltd closed 3 years ago

nimaltd commented 3 years ago

How can I use both 315/433 frequency at the same time on 2 different pins.

RCSwitch                            rf433 = RCSwitch();
RCSwitch                            rf315 = RCSwitch();
.
.
.
void setup()
{
    rf315.enableReceive(6);
    rf433.enableReceive(7);
}

it does not work if I enabled both of them

pierzogad commented 3 years ago

Short answer is NO.

RCSwitch implementation doesn't allow you to create 2 instances of code. There is just single (shared) variable for receiving buffer, return code and few others.

elexal commented 2 years ago

how to share when configuration enablereceived pin in setup ?!