In toggleState, use console.log(JSON.stringify(x)); to see why the interrupt triggered.
Regards, John > On Jul 21, 2017, at 1:52 PM, William B <[email protected]> wrote: > > Hello! I'm using an interrupt with Beaglebone Black as indicated below, > however I'm having problem. > PROBLEM: The interrupt that goes through the callback function "toggleState" > is triggering itself, without any external reason or action. > > Has anyone seen this happen and knows how to solve it? > > > EXAMPLE: > > myInput = 'P9_11'; > > b.pinMode(myInput, b.INPUT); > b.attachInterrupt(myInput, true, b.CHANGE, toggleState); > > function toggleState(x) { <<==== Running for no reason > console.log('Interruption triggered'); > } > > -- > For more options, visit http://beagleboard.org/discuss > <http://beagleboard.org/discuss> > --- > You received this message because you are subscribed to the Google Groups > "BeagleBoard" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <mailto:[email protected]>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/beagleboard/51f710e8-8055-4f1f-aa80-c6eb22289d13%40googlegroups.com > > <https://groups.google.com/d/msgid/beagleboard/51f710e8-8055-4f1f-aa80-c6eb22289d13%40googlegroups.com?utm_medium=email&utm_source=footer>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/B9E3BA3F-0E04-4F52-BD4C-55C3D56CB172%40gmail.com. For more options, visit https://groups.google.com/d/optout.
