diff --git a/src/_EMR/main.js b/src/_EMR/main.js new file mode 100644 index 0000000..d02d86c --- /dev/null +++ b/src/_EMR/main.js @@ -0,0 +1,16 @@ +// Import modules +const gpio = require('./custom_modules/VoidGPIO.js'); +const config = require('./custom_modules/config.json'); +const fn = require('./custom_modules/functions.js'); + +// Auger Loop +setInterval(fn.routines.cycleAuger, 2000); + +fn.log('Setting exhaust to low to keep NC relay closed and fan running'); +gpio.setPin(process.pinMap.get('exhaust').board, 0); + +process.on('SIGINT', () => { + fn.log(`Exiting gracefully...`); + gpio.setPin(process.pinMap.get('auger').board, 0); + process.exit(); +}); \ No newline at end of file