goddamit idk it will be repository
This commit is contained in:
9
src/promises/index.js
Normal file
9
src/promises/index.js
Normal file
@@ -0,0 +1,9 @@
|
||||
function digitalRead (board, pin) {
|
||||
return new Promise((resolve, reject) => {
|
||||
board.digitalRead(pin, (val) => {
|
||||
resolve(val);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = { digitalRead };
|
||||
Reference in New Issue
Block a user