This commit is contained in:
Skylar Grant 2022-11-26 19:49:07 -05:00
parent eaccbbb728
commit be668beb23
1 changed files with 4 additions and 5 deletions

View File

@ -1,5 +1,5 @@
var gpio = require('rpi-gpio');
gpio.setup(7, gpio.DIR_OUT, write);
gpio.setup(7, gpio.DIR_OUT, cycleAuger);
function augerOn(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 onTime = 500; //ms
augerOn();
@ -41,6 +42,4 @@ async function cycleAuger() {
augerOff();
await sleep(offTime);
cycleAuger();
}
cycleAuger();
}