Open mAPBhlJ opened 8 years ago
I'm now using interrupt pin 3 (interrupt source 1) instead of pin 2 (interrupt source 0) And I use pin 4 (instead of pin 2) for the other regular I/O pin.
This seems to work well with the library. If you see anything logical, please share. If you think it's worth investigating (or have any ideas to try), please say so. If you don't bother, you can close this issue.
It may be something with the power, since it's on Arduino Nano with Nano Ethernetboard. I'm powering it through USB, so that could be a problem. But it really doesn't make sense why using other pins would change anything.
I was also questioning that it could have something to do with my board, but that seems illogical since it does work without the Ethernet library started.
Arg, same problem here, and I need both hardware interrupt: 2 & 3 :( Any idea where pin 2 it is used in the library ?
It seems to be some kind of Heartbeat, because I get interruption on pin 2 every second almost. I really couldn't see it in in the library source. It doesn't seem to come for the Ethernet Shield, since without invoking anything from IUPEthernet library, it works fine.
If it's still relevant to someone:
I've had the same experience recently by using this combination:
In my application I was using both interrupts on pin D2 and D3, respectively.
When activating Ethernet.begin(mac, ip) the interrupts ceased to work. In my application I was able to reduce the interrupt to pin D3 and separate pin D2 from the circuit. Then everything was ok.
It seems that the UIPEthernet library uses the D2 pin for some internal purpose.
If one still requires two interrupts on the Nano when having the Ethernet shield attached, it might be possible to use this approach: https://www.brainy-bits.com/make-any-arduino-pin-an-interrupt-pin/
However, I have not tried this.
I must say you've got quite a nice library, however, it seems to break my code for no apparent reason.
I've got a encoder (Keyes K-040) with built-in button, and would like to make it an "ethernet dimmer". My code works very well actually, but when I use "Ethernet.begin(mac)", it just wont register encoder changes anymore. Interesting fact is, that the button works regardless of the Ethernet being active or not.
I've attached my code below and will check if it works without interrupts. (But I don't see why it should be a problem)