Add emergency auger loop
This commit is contained in:
parent
e7cf1d34f2
commit
8224161476
16
src/_EMR/main.js
Normal file
16
src/_EMR/main.js
Normal 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();
|
||||||
|
});
|
Loading…
Reference in New Issue
Block a user