Interrupt from sleep mode
i have arduino uno connected breadboard on pin #3 , 10k resistor , 3.3v pin.
i installed button in between them can represent break in connection fire interrupt.
trouble button not seem fire interrupt @ all. if remove 3.3v wire floats on pin #3 wakes up.
any ideas why cannot seem recognize break in connection?
sketch attached
i installed button in between them can represent break in connection fire interrupt.
trouble button not seem fire interrupt @ all. if remove 3.3v wire floats on pin #3 wakes up.
any ideas why cannot seem recognize break in connection?
sketch attached
you need switch pin ground if using pull-up resistor, not break link pull-up.
the point avoid pin floating ever, since isn't defined if floating, behaviour unpredicatable.
so pin 3 connected 5v via resistor, add button between pin 3 , gnd.
you lose resistor , declare pin internal pull-up enabled:
the point avoid pin floating ever, since isn't defined if floating, behaviour unpredicatable.
so pin 3 connected 5v via resistor, add button between pin 3 , gnd.
you lose resistor , declare pin internal pull-up enabled:
code: [select]
void setup ()
{
pinmode (3, input_pullup) ;
...
}
Arduino Forum > Using Arduino > General Electronics > Interrupt from sleep mode
arduino
Comments
Post a Comment