Add more detailed logging

This commit is contained in:
Skylar Grant 2024-08-18 13:49:41 -04:00
parent fee1e0e88e
commit 27cc6bafe5
1 changed files with 3 additions and 1 deletions

View File

@ -75,7 +75,7 @@ module.exports = {
})
},
// Boot up sanity check during debug mode
debugInit() {
async debugInit() {
console.log('Resetting all output pins.');
pins.forEach(async (pin) => {
if (pin.mode === 'OUT') {
@ -90,11 +90,13 @@ module.exports = {
case 'OUT':
this.togglePin(pin.board, err => {
if (err) throw err;
console.log(`Toggled ${pin.key}`);
});
// Wait 1000ms before toggling again.
await sleep(1000);
this.togglePin(pin.board, err => {
if (err) throw err;
console.log(`Toggled ${pin.key}`);
});
break;
case 'IN':