Closed scsirdx closed 9 years ago
I planned these changes to a new version but thank you :)
But i think the callback parameter should be at the end (it's always the last param) and the pinNumber should be optional
I think i will use promises in the next version
There is a problem with pin = pin || 2;
. If you pass a 0
it would never be 0
but 2
. This line should work better : pin = typeof pin !== 'undefined' ? pin : 2
Fixed pin num and moved callback param. But this is a breaking change. This is a reason, why i leaved callback as a 2nd argument.
This this not a breaking change if you check the number/type of parameters. I'm working on it.
I changed code, so it now allow to setup input and output pin like:
Sorry for tab changes, linter changed it, and i noticed only while creating pull request.