Teensy 4.1 Arduino external interrupt (pin interrupt) minimal example
In setup()
, use
attachInterrupt(digitalPinToInterrupt(23), myInterrupt, RISING);
to configure the interrupt on Teensy Pin 23
on the RISING
edge.
Add this function, which will be called during the interrupt:
void myInterrupt() {
// Your code goes here
}
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow