This commit is contained in:
Skylar Grant 2022-11-26 19:49:07 -05:00
parent eaccbbb728
commit be668beb23

View File

@ -1,5 +1,5 @@
var gpio = require('rpi-gpio'); var gpio = require('rpi-gpio');
gpio.setup(7, gpio.DIR_OUT, write); gpio.setup(7, gpio.DIR_OUT, cycleAuger);
function augerOn(err) { function augerOn(err) {
if (err) throw err; if (err) throw err;
@ -33,7 +33,8 @@ function sleep(ms) {
}); });
} }
async function cycleAuger() { async function cycleAuger(err) {
if (err) throw err;
const offTime = 1500; //ms const offTime = 1500; //ms
const onTime = 500; //ms const onTime = 500; //ms
augerOn(); augerOn();
@ -42,5 +43,3 @@ async function cycleAuger() {
await sleep(offTime); await sleep(offTime);
cycleAuger(); cycleAuger();
} }
cycleAuger();