2.6 Interrupt Functions
- brief: re-enable interrupts after having been disabled by function noInterrupts().
- param: void
- return: void.
- brief: disable interrupts.
- param: void
- return: void.
- brief: attach interrupt to some particular digital pin. Whenever there is an interrupt, function ISR will be called.
- param:
- digitalPinToInterrupt(pin): an interrupt is normally triggered from a particular pin.
- ISR: Interrupt Service Routine, a function has NO parameters and has NO return value.
- mode: LOW, HIGH, CHANGE, RISING or FALLING.
- 1.LOW: trigger the interrupt whenever the pin is at low-level.
- 2.HIGH: trigger the interrupt whenever the pin is at high-level.
- 3.CHANGE: trigger the interrupt whenever the pin changes from HIGH to LOW, or from LOW to HIGH.
- 4.RISING: trigger the interrupt whenever the pin changes from LOW to HIGH.
- 5.FALLING: trigger the interrupt whenever the pin changes from HIGH to LOW.
- return: void.
- brief: detach interrupt from some particular digital pin.
- param:
- digitalPinToInterrupt(pin): an interrupt is normally triggered from a particular pin.
- return: void.
Last modified 5yr ago