You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I am wondering that in "powerDownWakeExternalInterrupt.ino", what is the function of "wakeUpPin = 2" ? Since the variable wakeUpPin does not be invoked anywhere during the loop(). Does it mean that any voltage changes on any pin can wake up the system?
The text was updated successfully, but these errors were encountered:
You can have a long list of lines in a function, but if your interrupt is triggered the processor will jump to whatever function is linked to it ( in this example wakeUp() )
Arduino actually does this for millis(). No matter what else your own loop code is doing, it will very quickly stop at exactly a certain time, update the millis() value a little then return to where it left your own code.
You can have a long list of lines in a function, but if your interrupt is triggered the processor will jump to whatever function is linked to it ( in this example wakeUp() )
Arduino actually does this for millis(). No matter what else your own loop code is doing, it will very quickly stop at exactly a certain time, update the millis() value a little then return to where it left your own code.
Thanks for your answer. I searched online and found that the code in line22 of the powerDownWakeExternalInterrupt.ino is usually written as attachInterrupt(digitalPinToInterrupt(interruptPin), wakeUp, LOW);.
Does it means that for Arduino (AVR versions), certain pins have certain interrupt numbers? So if we use attachInterrupt(0, wakeUp, LOW); actually we define pin3 as the interrupt pin?
Hi, I am wondering that in "powerDownWakeExternalInterrupt.ino", what is the function of "wakeUpPin = 2" ? Since the variable wakeUpPin does not be invoked anywhere during the loop(). Does it mean that any voltage changes on any pin can wake up the system?
The text was updated successfully, but these errors were encountered: