Index
 
  Reference for Wiring 1.0 (ALPHA) 0017+. If you have a previous version, use the reference included with your software. If you see any errors or have any comments, let us know.
Name  

interruptMode()

   
Examples  
interruptMode(0, RISING); // set the interrupt mode for the external interrupt 0 to RISING 
                            // (everytime the pin gets from LOW to HIGH) 

Description   It is possible to generate and attend external interrupts on the Wiring I/O board. There are 8 external interrupts, from 0 to 7 so there are 8 pins on the Wiring I/O board capable of external interrupts, 0, 1, 2, 3, 36, 37, 38, and 39 respectively. In addition to being regular digital pins, note that pins 0 and 1 are also used for the Wire library (TWI) and pins 2 and 3 are also the Serial1 serial port pins. The interruptMode method sets the mode in which an external interrupt is generated. External interrupts can be triggered at different stages in the value of a pin, LOW when a pin is low, CHANGE when the pin changes, RISING when the pin goes from low to high or FALLING when the pin goes from high to low.

Wiring I/O 보드에는 외부 인터럽트를 사용할 수 있습니다. Wiring I/O 보드의 핀 0, 1, 2, 3, 36, 37, 38, 39 에 0 부터 7 까지 번호가 부여되는 8 개의 인터럽트가 가능합니다. 핀 0과 1 은 TWI(I2C) 인터페이스와 중복됩니다. 핀 2, 3은 Serial1 시리얼 포트로 중복됩니다. interruptMode 메소드는  인터럽트가 발생하는 조건을 설정합니다. 

LOW 는 핀이 LOW 일 때 인터럽트가 발생하도록 합니다.
CHANHE 는 LOW 에서 HIGH 로 변할 때 또는 HIGH에서 LOW 로 변할 때 인터럽트가 발생합니다. 
RISING 은 핀이 LOW에서 HIGH 로 변할 때 인터럽트가 발생합니다. 
FALLING 은 핀이 HIGH에서 LOW 로 변할 때 인터럽트가 발생합니다. 

   
Syntax  
interruptMode(interrupt, mode)
   
Parameters  
interrupt   The number of the external interrupt, from 0 to 7

0 부터 7 까지의 외부 인터럽트 번호
mode   LOW, CHANGE, RISING or FALLING: the mode the external interrupt is triggered

   
Returns   None
   
Usage   Application
   
Related   attachInterrupt()
detachInterrupt()
LOW
CHANGE
RISING
FALLING