I made a sketch using INT0 and INT1 both connected to IR Breakbeams and an lcd connected to i2c (adafruit).
I noticed something i can't really explain:
INT0 seems always working as expected, no issue there.
INT1 seems working most of the time but goes "Missing in actions" during few seconds from time to time then resume its operations like nothing happened.
I swapped the physicals parts and still get the same results.
I somewhat suspects something related to i2c but can't really find anything relevant and furthermore, is there any 'solution' to that behaviour ?
ActiveGate = digitalRead(GRIGHT);
if (ActiveGate==LOW){
If you're only interested in the beam becoming LOW you can just set the interrupt to FALLING
attachInterrupt(0, GateLeft, FALLING);
Btw, the const parameter has the preference to use over a #define for a pin define. Same goes for starting a variableName without a capital if it's non-const.