Add emergency auger loop

This commit is contained in:
Skylar Grant 2024-11-24 15:20:13 -05:00
parent e7cf1d34f2
commit 8224161476

16
src/_EMR/main.js Normal file
View File

@ -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();
});