ข้ามไปยังเนื้อหา

Lesson 44: Interrupts

English

Stop what you are doing!

  • A program that waits in delay does not look at its buttons. A short press is missed.
  • An interrupt is a signal that says "this needs attention now". The processor stops its program, runs a short function (the interrupt service routine, ISR), then goes back to where it was.
  • On an Arduino Uno, pins 2 and 3 can make interrupts.

Words for this lesson

Word Meaning
interrupt a signal that needs the processor's attention
ISR the function that handles the interrupt
FALLING the moment a pin goes from HIGH to LOW
volatile a variable an interrupt can change

เข้าสู่ระบบหรือสร้างบัญชี

IGCSE, A-Level & AP