Interrupt (arduino)

We Interrupt This Broadcast…

TL;DR (nice ref)

When writing an Interrupt Service Routine (ISR):

  • Keep it short
  • Don’t use delay ()
  • Don’t do serial prints
  • Make variables shared with the main code volatile
  • Variables shared with main code may need to be protected by “critical sections” (see below)
  • Don’t try to turn interrupts off or on

INPUT or INPUT_PULLUP

Analog Comparator Interrupt

More than 2 pin interrupts

Written on August 7, 2019, Last update on August 13, 2019
arduino interrupt