This commit is contained in:
Skylar Grant 2024-08-21 22:26:20 -04:00
parent a0b0d16c73
commit 8a68c00f01
1 changed files with 2 additions and 2 deletions

View File

@ -148,8 +148,8 @@ module.exports = {
},
handlers: {
stateChange(change) {
gpio.togglePin(pinMap[change.name].board).then(() => {
console.log(`Pin ${config.states[change.name].pin} set to ${change.on}`);
gpio.togglePin(pinMap.get(change.name).board).then(() => {
console.log(`${change.name} toggled.`);
}).catch(e => console.error(e));
}
}