Pages: 1 [2]   Go Down
Author Topic: Buttons, interrupts and de-bouncing  (Read 1841 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
So does it make sense to always use interrupts

No. Nor does it make sense to always use polling.

As a matter of fact, it doesn't make sense to always do anything.
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 106
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok, more confused smiley-roll
I found this from Ladyada and she writes:
"To change the pins or number of buttons, just put them in the array called “buttons” and the rest of the code will automatically adjust."
http://www.adafruit.com/blog/2009/10/20/example-code-for-multi-button-checker-with-debouncing/
The second sketch uses interrupts. But she is using analog inputs and how can i just ad buttons if i can't just
use every input pin as interrupt??

This sketch also says: "which pin to use for reading the sensor? can use any pin!"
https://raw.github.com/adafruit/Adafruit-Flow-Meter/master/Adafruit_FlowMeter.pde
Logged

Pages: 1 [2]   Go Up
Jump to: