void setup() {
// put your setup code here, to run once:
attachInterrupt(digitalPinToInterrupt(8),buttonPressed1,RISING);
attachInterrupt(digitalPinToInterrupt(7),buttonPressed2,FALLING);
}
void buttonPressed1()
{
//输出 = 高;
digitalWrite(PIN_D6, LOW); // LED on
}
void buttonPressed2()
{
//输出 = 低;
digitalWrite(PIN_D6, HIGH); // LED off
}
void loop() {
// put your main code here, to run repeatedly:
}