關於arduino中斷的問題

發布於 2023-08-03 18:45:29

大家好,我是小學生,我寫了一個中斷attachInterrupt(digitalPinToInterrupt(interruptPin), blink, CHANGE);顯示報錯Compilation error: 'digitalPinToInterrupt' was not declared in this scope
我用esp32和esp8266都能編譯通過,就這個不行,愁死了,請問怎麼解決這個問題

查看更多

關注者
0
被浏覽
1.9k
AnatolSher
AnatolSher 認證專家 2023-08-03
Lover of the ocean, yachts and Arduino

Don't worry. First, you must update the w80x arduino core. I posted the XT804.ZIP file in the "More Compatibility" article.
Then come back and show me your code.

Download the test case from BasicExamples - Gpio interrupts. Compilation will succeed
image.png

Expression AttachInterrupt(digitalPinToInterrupt(interruptPin), blink, CHANGE); - not correct. Enough of this:
image.png
Documentation mismatch found! Thank you
https://github.com/board707/w80x_arduino/issues/22#issue-1835001038

1 個回答

撰寫答案

請登錄後再發布答案,點擊登錄

發布
問題

分享
好友

手機
浏覽

掃碼手機浏覽