-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reverse #47
Comments
So writing 0 to a GPIO sets it to 1 and writing a 1 sets it to 0? 0 would read as 1 and 1 would read as 0? |
Exactly. On Sun, May 1, 2016 at 10:51 AM Brian Cooke notifications@github.com
|
This should also be possible for inputs. 0 would read as 1 and 1 would read as 0. rising edge interrupts would become falling edge interrupts and falling edge interrupts would become rising edge interrupts. |
This is a good idea. I'll add it. |
Excellent Thanks On Tue, May 3, 2016 at 6:32 PM Brian Cooke notifications@github.com wrote:
|
onoff v1.1.0 was just published on npm. The Gpio constructor has an new option called var Gpio = require('onoff').Gpio,
input = new Gpio(7, 'in', {activeLow: true}),
output = new Gpio(8, 'out', {activeLow: true}); |
Thanks. On Wed, May 4, 2016, 10:28 AM Brian Cooke notifications@github.com wrote:
|
You're welcome :) |
A lot of times the io is connected to relays the reverse the output. E.G. Gpio goes low, relay closes. It would be nice to have a "reverse" parameter in the constuctor.
The text was updated successfully, but these errors were encountered: