Which block of code is a reasonable interrupt service routine orISR?
a. void incrementCount() { if (digitalRead(encoderB)==HIGH){i=i+1;} else {i=i-1;} }
b. void incrementCount() { while (digitalRead(encoderB)==HIGH){i=i+1;} }
c. attachInterrupt(0, incrementCount, RISING);
d. attachInterrupt(0, incrementCount, CHANGE);
Expert Answer
An answer will be send to you shortly. . . . .