Interrupts()
From Microduino Wiki
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(); //重要、时间敏感的代码 interrupts(); //其他代码写在这里 }