Closed rwaldron closed 12 years ago
See also: http://arduino.cc/it/Tutorial/Button
When the pushbutton is open (unpressed) there is no connection between the two legs of the pushbutton, so the pin is connected to ground (through the pull-down resistor) and we read a LOW. When the button is closed (pressed), it makes a connection between its two legs, connecting the pin to 5 volts, so that we read a HIGH.
Looks like this was fixed in the repo, but not pushed to npm?
Sorry, I realize now that this ticket was completel obnoxious. If I'd bothered to look at the commit history, I would've seen that the last commit fixed this, unfortunately it just says "Merge pull request #6 from richkzad/patch-1…" on the main project page.
No worries, I wanted to document this but I've been insanely busy. Thanks for your help man!
In lib/board.js:
...which is backwards; button "up/unpressed" will be LOW/0/gnd and button "down/pressed" will be HIGH/1/5v