Interrupts()

From Microduino Wiki
Jump to: navigation, search

interrupts()

  • Description

Restart the interrupt(it will be forbidden after using noInterrupts() command). The interrupt allows some important tasks to run in the background, and the state of it is enabled by default. After forbidding the interrupt, some functions may not be able to work, and the incoming information maybe ignores. The interrupt will slightly disturb the time of the code, so you can forbid the it in the key part.

  • Parameter

No

  • Return

No

  • Example

void setup() {
}
 
void loop()
{
  noInterrupts();
  //important and time-sensitive code 
  interrupts();
  //write other codes here 
}

[Return to Arduino Syntax Manual]