UIPEthernet & RCSwitch

Hello !

I have a small project using Arduino Uno, and both libraries RCSwitch/UIPEthernet with the ENC28J60 module. Apparently for some reason, using interrupt 0 for RCSwitch creates some issues, here is below the code and the issue. I have 2 main functions in setup() :

  • mySwitch.enableReceive(0);
  • server.begin();

The code :

Serial.println("Starting rcswitch");
mySwitch.enableReceive(0);

Serial.println("Starting comm");
Ethernet.begin(mac);
server.begin();

When I execute this, I have an infinite loop in the monitor :
Starting rcswitch
Starting comm
Starting rcswitch
Starting comm
Starting rcswitch
Starting comm
...

If I disable mySwitch.enableReceive(0); with comments ("//") everything else works perfectly fine, but not rcswitch.Any idea ? Pretty weird. I used pin 2 for RCSwitch (Interr. 0).

Mickael.