attachIntDio()
to enable DIO interrupt.
Enables DIO interrupts.
For a preconfigured pin, the first parameter is the pin number for which you want to enable interrupts, the second is the interrupt direction (rising, falling.
Interrupt handlers and event handlers are written in Application BEHAVIOR.
Example
Set up an interrupt to be generated when the DIO5 pin changes from HIGH to LOW.
myAppClass.hpp
Basic definition of the application behavior myAppClass
. Details are omitted.
myAppClass.cpp
Description of the interrupt handler of the application behavior myAppClass
, which inverts the output setting of DIO12 when an interrupt of DIO5 is generated and displays *
on the serial port Serial
for events occurring after the interrupt handler is finished.
最終更新