digitalPinToInterrupt() function takes a pin as an argument, and returns the same pin if it can be used as an interrupt. For example,
digitalPinToInterrupt(4) on an Arduino UNO will not work, as interrupts are only supported on pins 2,3.
See attachInterrupt() for a full list of supported interrupt pins on all boards.
pin- the pin we want to use for an interrupt.
The pin to interrupt (e.g.
If pin is not available for interrupt, returns