1.

What is the use of the detachInterrupt() function?(a) To turn off interrupt(b) To turn on interrupt(c) To disable interrupt functions for the remaining ON time.(d) To turn off the ArduinoI have been asked this question in an online quiz.My question is based upon Interrupt Service Routine in division Arduino Programming of Arduino

Answer» RIGHT option is (a) To turn off interrupt

Easy explanation: The interrupt SERVICE ROUTINE can be used to automate a NUMBER of functions in an arduino. In a situation where the entire focus of the code is bound to ONE function, the ISR can act as a pause for the arduino to stop the current function temporarily and divert memory to another function. The detachInterrupt() function turns off the ISR functionality temporarily.


Discussion

No Comment Found

Related InterviewSolutions