move vars to .env

This commit is contained in:
Skylar Grant 2022-11-26 20:50:20 -05:00
parent d27d34665b
commit be54f6f769
1 changed files with 4 additions and 4 deletions

View File

@ -1,4 +1,6 @@
var gpio = require('rpi-gpio');
var dotenv = require('dotenv').config();
gpio.setup(7, gpio.DIR_OUT, cycleAuger);
function augerOn(err) {
@ -35,11 +37,9 @@ function sleep(ms) {
async function cycleAuger(err) {
if (err) throw err;
const offTime = 1000; //ms
const onTime = 500; //ms
augerOn();
await sleep(onTime);
await sleep(process.env.ONTIME);
augerOff();
await sleep(offTime);
await sleep(process.env.OFFTIME);
cycleAuger();
}