Fix import of config and pins
This commit is contained in:
parent
24470fe6f2
commit
ccc84173cb
@ -1,6 +1,6 @@
|
||||
// Import modules
|
||||
const gpio = require('./custom_modules/VoidGPIO.js');
|
||||
const { pins } = require('./custom_modules/config.json');
|
||||
const config = require('./custom_modules/config.json');
|
||||
const fn = require('./custom_modules/functions.js');
|
||||
const { State, Communicator } = require('./custom_modules/HestiaClasses.js');
|
||||
|
||||
@ -13,7 +13,7 @@ fn.gpio.debugInit();
|
||||
|
||||
// Sensor detection loop
|
||||
setInterval(() => {
|
||||
for (const pin of pins) {
|
||||
for (const pin of config.pins) {
|
||||
if (pin.mode === 'IN') {
|
||||
gpio.readPin(pin.board, (err, state) => {
|
||||
if (err) throw err;
|
||||
|
Loading…
Reference in New Issue
Block a user