sui77 / rc-switch

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

rc-switch timing issue with reading GPS data (Arduino) #300

Open HankLloydRight opened 5 years ago

HankLloydRight commented 5 years ago

Hello, Thanks for rc-switch -- it's a great library!

But I'm trying to integrate it with a GPS device, and I find that when I enable rc-switch with:

mySwitch.enableReceive(1);

...it introduces an internal delay somewhere that throws off the timing of reading the GPS data stream, causing the GPS data to generate about a 50% error rate -- even when no remote buttons are being pressed, just idle state.

Once I remove the enableRecieve(1) statement, the code works perfectly and the GPS data stream has zero errors.

Is there a way to use rc-switch that doesn't introduce a small loop{} delay and only triggers when the actual interrupt pin is triggered?

Thanks.