第一頁 返回 繼續 最後一頁 概覽 影像
中斷服務程式(一)
- https://www.arduino.cc/en/Reference/AttachInterrupt
- ATMega328僅有D2,D3兩隻腳可以接受中斷
- 中斷服務程式中不能再被中斷
- delay()不能用、millis()數字不會增加
- 不能接受參數,也不會回傳資料,用修改共用變數方式
- attachInterrupt(digitalPinToInterrupt(pin), ISR, mode);
- Mode:LOW、CHANGE、RISING、FALLING
- t7