Using INT pin as both INT and Digital input simulateously

INTzeroY
Figure-1:

1. Before using pinBut as a digital input device, just execute the following codes:

detachInterrupt();  //interrupt pin goes back to digital IO mode
pinMode(2, INPUT_PULLUP);
-----do waht ever you have-------------
attachInterrupt(digitalPinToInterrupt(2), ISRINTZER0, FALLING); //Dpin-2 is back to interrupt
1 Like