03 2022 档案
摘要:外部中断的三个要素 1.PIN 也就是GPIO 2.中断服务函数 3.触发方式 例子 初始化 pinMode(0, INPUT_PULLUP); attachInterrupt(0, PinIntEvent, FALLING); 中断服务函数 void PinIntEvent() { Serial.
阅读全文
摘要:#include <Arduino.h> void setup() { // put your setup code here, to run once: pinMode(2, OUTPUT); } void loop() { // put your main code here, to run r
阅读全文