Arduino Programming Language: Interrupts

Name

interrupts()

Description

Interrupts()method enables the interrupts, after it has been disabled by noInterrupts(). 
By default interruptions are enabled to allow important tasks to happen in the background. 
Some functions will not work while interrupts are disabled, and incoming communication may be ignored. 
The interrupts may be disabled for particularly critical sections of code.

Syntax

interrupts()

Parameters

  • none

Returns

none 

Usage

Application

Examples

void setup() {
}
void loop() {
noInterrupts(); // disable all possible interruptions
// critical code section
interrupts(); // enable interruptions
// other code
}

Related Functions


Based on the reference originally written by Arduino Community,  wiring.org.co and  arduino.cc