Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

10
  • Thanks, you are right. But I'm not sure where it should be placed, and why?? Commented Feb 15, 2017 at 22:28
  • You are correctly doing little in the ISR: set a flag telling the main program to handle something. You should unset that flag when you are done doing handling the something you needed to handle. Guessing from your code: in the alarm() function. Commented Feb 15, 2017 at 22:55
  • It seems as if the interrupt on pin 2 is not triggering the function. Not sure what is wrong. Commented Feb 16, 2017 at 15:19
  • I did make the change in the alarm function, but still not getting the interrupt to trigger. } trigsensor = false; readKeypad(); } Commented Feb 16, 2017 at 15:24
  • What does the signal on the interrupt pin look like? You initialize it to trigger on a rising edge -- is that what is happening with the actual signal? Commented Feb 16, 2017 at 15:52