| 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 로
변할 때 인터럽트가
발생합니다.
|