This commit is contained in:
Skylar Grant 2022-12-03 18:20:38 -05:00
parent 2606a5258f
commit 9ef858cc94
3 changed files with 39 additions and 4 deletions

View File

@ -15,7 +15,7 @@ const functions = {
if (err) throw err;
console.log('Auger GPIO Ready');
return;
}
},
// Turns the auger on (Pin 7 high)
on() {
gpio.write(7, true, function(err) {
@ -63,7 +63,7 @@ const functions = {
commands: {
pause() {
console.log('Paused...');
await this.sleep(process.env.PAUSETIME);
this.sleep(process.env.PAUSETIME).then(() => { return; });
return;
},
reload() {
@ -97,9 +97,8 @@ const functions = {
console.log('Environment variables:');
console.log(`ONTIME=${process.env.ONTIME}\nOFFTIME=${process.env.OFFTIME}\nPAUSETIME=${process.env.PAUSETIME}\nDEBUG=${process.env.DEBUG}`);
return true;
}
},
}
}
module.exports = { functions }

28
package-lock.json generated Normal file
View File

@ -0,0 +1,28 @@
{
"name": "pscontrolpanel",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "pscontrolpanel",
"dependencies": {
"dotenv": "^16.0.3"
}
},
"node_modules/dotenv": {
"version": "16.0.3",
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.3.tgz",
"integrity": "sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ==",
"engines": {
"node": ">=12"
}
}
},
"dependencies": {
"dotenv": {
"version": "16.0.3",
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.3.tgz",
"integrity": "sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ=="
}
}
}

8
package.json Normal file
View File

@ -0,0 +1,8 @@
{
"name": "pscontrolpanel",
"requires": true,
"packages": {},
"dependencies": {
"dotenv": "^16.0.3"
}
}