<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class=""><div class=""><blockquote type="cite" class=""><br class="">All I do in the handler is detach the interrupt.<br class=""></blockquote>This is the point in other forums where somebody would yell at you for <br class="">not showing us enough of your code. :-)<br class=""><br class="">I studied the detachInterrupt code for the 32U4 and it does just what <br class="">one would expect: clears the enable register bit for the given interrupt <br class="">number. You're sure you're giving it the correct interrupt number and <br class="">not the pin number, right? If that was mixed up then every time you <br class="">pushed the button you'd still be getting another interrupt. If it's a <br class="">level interrupt vs edge triggered, then that would explain the hang <br class="">until you released the button ('cause every time you left the handler <br class="">the interrupt would occur again while the button was pressed)<br class=""></div></div></blockquote><div><br class=""></div><div>Yeah the initial mistake was using detachInterrupt(BUTTON_0); not detachInterrupt(digitalPinToInterrupt(BUTTON_0)); I think I still had issues after fixing that though.</div><div><br class=""></div><div>I am using level interrupts. Does the 32u4 wake from an edge? However, I do detach the interrupt in the handler… maybe it still jumps to the start in memory before it gets to the detach instructions though. Good point.</div><div><br class=""></div><div>Hopefully my new LIS3DH boards will come in soon!</div><div><br class=""></div></div><br class=""><div class="">
<div style="color: rgb(0, 0, 0); font-family: Monaco; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class=""><br class="Apple-interchange-newline">|\ |  (¯  \/ |¯\  |V| |\ ¯|¯ |¯) | \/ | | | |¯\ (¯   /¯  /\ |V|</div><div style="color: rgb(0, 0, 0); font-family: Monaco; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">|-||_ (_  /\ |_/ @| | |-| |  | \ | /\ |^| | |_/ (_ . \_  \/ | |</div><br style="color: rgb(0, 0, 0); font-family: Monaco; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class=""><br style="color: rgb(0, 0, 0); font-family: Monaco; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class=""><br style="color: rgb(0, 0, 0); font-family: Monaco; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class=""><br style="color: rgb(0, 0, 0); font-family: Monaco; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class=""><br style="color: rgb(0, 0, 0); font-family: Monaco; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class=""><br style="color: rgb(0, 0, 0); font-family: Monaco; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">
</div>
<br class=""></body></html>