Skip to content
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

add option to modify gpio base path for testing purposes #40

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules/
/node_modules
/test/data
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@ var gpio4 = gpio.export(4, {
// read or write to the header right away. Place your logic in this ready
// function to guarantee everything will get fired properly
ready: function() {
}
},

// To be able to test gpio-dependent code, you can set the gpio base path.
// This way you can modify the gpio value in your test code.
gpioBasePath: '/sys/class/gpio/'
});
```

Expand Down
Loading