sui77 / rc-switch

Arduino lib to operate 433/315Mhz devices like power outlet sockets.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

I can not use both frequency

nimaltd opened this issue · comments

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

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.

how to share when configuration enablereceived pin in setup ?!