Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 2 of 2

Thread: Attachinterrupt Mode

  1. #1
    Senior Member
    Join Date
    Feb 2020

    Attachinterrupt Mode

    In the attachinterupt() function can HIGH be used as the mode?

    From the Arduino Interrupt reference

    HTML Code:
    interrupt: the number of the interrupt. Allowed data types: int.
    pin: the Arduino pin number.
    ISR: the ISR to call when the interrupt occurs; this function must take no parameters and return nothing. This function is sometimes referred to as an interrupt service routine.
    mode: defines when the interrupt should be triggered. Four constants are predefined as valid values:
    LOW to trigger the interrupt whenever the pin is low,
    CHANGE to trigger the interrupt whenever the pin changes value
    RISING to trigger when the pin goes from low to high,
    FALLING for when the pin goes from high to low.
    The Due, Zero and MKR1000 boards allow also:
    HIGH to trigger the interrupt whenever the pin is high.

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Yes, attachInterupt HIGH works on all Teensy models.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts