From be54f6f769e2f1e44a74265c02b8d3cba84e7da0 Mon Sep 17 00:00:00 2001 From: Skylar Grant Date: Sat, 26 Nov 2022 20:50:20 -0500 Subject: [PATCH] move vars to .env --- main.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.js b/main.js index 2e5d66b..880bdc9 100644 --- a/main.js +++ b/main.js @@ -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(); } \ No newline at end of file