use all pins for interrupt arduino code example Example: interrupt arduino attachInterrupt(digitalPinToInterrupt(interruptPin), someFuntion, CHANGE);