This commit is contained in:
Skylar Grant 2024-08-18 13:15:44 -04:00
parent f16ccbeaa6
commit 582c05cdc3

View File

@ -46,16 +46,16 @@ module.exports = {
pins.forEach(async (pin) => {
switch (pin.mode) {
case 'OUT':
togglePin(pin.board, err => {
this.togglePin(pin.board, err => {
if (err) throw err;
});
// Wait 1000ms before toggling again.
setTimeout(togglePin(pin.board, err => {
setTimeout(this.togglePin(pin.board, err => {
if (err) throw err;
}), 1000);
break;
case 'IN':
sensePin(pin.board, (state, err) => {
this.sensePin(pin.board, (state, err) => {
if (err) throw err;
console.log(`${pin.key} state: ${state}`);
});