From 07c0efc2b0f40d52153702ca32fddb4766e05c71 Mon Sep 17 00:00:00 2001 From: Skylar Grant Date: Sat, 26 Nov 2022 19:41:39 -0500 Subject: [PATCH] a --- main.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/main.js b/main.js index b49cca2..1126881 100644 --- a/main.js +++ b/main.js @@ -1,6 +1,9 @@ //This example shows how to setup the pin for write mode with the default state as "on". Why do this? It can sometimes be useful to reverse the default initial state due to wiring or uncontrollable circumstances. //var gpio = require('rpi-gpio'); +const offTime = 1500; //ms +const onTime = 500; //ms + //gpio.setup(7, gpio.DIR_OUT, write); // function augerOn(err) { @@ -30,15 +33,15 @@ function augerOn() { function sleep(ms) { return new Promise((resolve) => { setTimeout(resolve, ms); - console.log("Slept for ${ms}ms"); + console.log(`Slept for ${ms}ms`); }); } async function cycleAuger() { augerOn(); - await sleep(500); + await sleep($onTime); augerOff(); - await sleep(800); + await sleep($offTime); cycleAuger(); }