Another reference error

This commit is contained in:
Skylar Grant 2024-08-18 14:39:07 -04:00
parent e7ada41977
commit f861b1a145

View File

@ -9,6 +9,9 @@ module.exports = {
console.log(message);
}
},
sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
},
gpio: {
// Boot up sanity check during debug mode
async debugInit() {
@ -29,7 +32,7 @@ module.exports = {
module.exports.log(`Toggled ${pin.key}`);
});
// Wait 1000ms before toggling again.
await sleep(1000);
await module.exports.sleep(1000);
gpio.togglePin(pin.board, err => {
if (err) throw err;
module.exports.log(`Toggled ${pin.key}`);