Interrupts in arduino Yun
hi
i have problem interrupts in arduino yun.
as understand: after interrupt (interrupt performed when detects rising edge) processor should continue main program in case not.
when press button interrupt executed , program "hangs" in interruption, not return loop ().only after releasing button, program return main loop().
my code looks this:
i ask / explanation of why can happen.
i have problem interrupts in arduino yun.
as understand: after interrupt (interrupt performed when detects rising edge) processor should continue main program in case not.
when press button interrupt executed , program "hangs" in interruption, not return loop ().only after releasing button, program return main loop().
my code looks this:
code: [select]
volatile int count = 0;
void setup()
{
attachinterrupt(0, inc, rising);
}
void loop()
{
// here few functions should performed cyclic
}
void inc() //interrupt function
{
count = count + 1; //variable incremented , program "hangs"
// @ point, not return loop ();
//until release button
}
i ask / explanation of why can happen.
i tried code, put blinking led in loop , works normally. maybe problem circuit? have in loop?
Arduino Forum > Products > Arduino Yún (Moderator: fabioc84) > Interrupts in arduino Yun
arduino
Comments
Post a Comment