Another reference error
This commit is contained in:
parent
e7ada41977
commit
f861b1a145
@ -9,6 +9,9 @@ module.exports = {
|
|||||||
console.log(message);
|
console.log(message);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
sleep(ms) {
|
||||||
|
return new Promise(resolve => setTimeout(resolve, ms));
|
||||||
|
},
|
||||||
gpio: {
|
gpio: {
|
||||||
// Boot up sanity check during debug mode
|
// Boot up sanity check during debug mode
|
||||||
async debugInit() {
|
async debugInit() {
|
||||||
@ -29,7 +32,7 @@ module.exports = {
|
|||||||
module.exports.log(`Toggled ${pin.key}`);
|
module.exports.log(`Toggled ${pin.key}`);
|
||||||
});
|
});
|
||||||
// Wait 1000ms before toggling again.
|
// Wait 1000ms before toggling again.
|
||||||
await sleep(1000);
|
await module.exports.sleep(1000);
|
||||||
gpio.togglePin(pin.board, err => {
|
gpio.togglePin(pin.board, err => {
|
||||||
if (err) throw err;
|
if (err) throw err;
|
||||||
module.exports.log(`Toggled ${pin.key}`);
|
module.exports.log(`Toggled ${pin.key}`);
|
||||||
|
Loading…
Reference in New Issue
Block a user