Tag Archives: interrupt

ESP8266 External Interrupt Example

In system programming, an interrupt is a signal to the processor emitted by hardware or software indicating an event that needs immediate attention. An interrupt alerts the processor to a high-priority condition requiring the interruption of the current code the processor is executing. The processor responds by suspending its current activities, saving its state, and executing a function called an interrupt handler (or an interrupt service routine, ISR) to deal with the event. This interruption is temporary, and, after the interrupt handler finishes, the processor resumes normal activities.

In this tutorial we learn how to use external interrupts with ESP8266? External interrupts configuration requires three step process.

  1. Initialize IO pin as Input.
  2. Initialize IO with Interrupt Subroutine definition.
  3. Interrupt Subroutine.

The ESP8266 has two different kinds of interrupts: “external”, and “pin change”. ESP8266 all pins have external interrupt except GPIO 16. These interrupts can be set to trigger on RISING or FALLING signal edges, or CHANGE of level.

Continue reading ESP8266 External Interrupt Example