.
This commit is contained in:
parent
eaccbbb728
commit
be668beb23
7
main.js
7
main.js
@ -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();
|
|
Loading…
Reference in New Issue
Block a user