parent
28be973244
commit
f6d6ccc92a
@ -165,5 +165,6 @@ if ! grep -w "logo.nologo" /boot/cmdline.txt; then
|
||||
fi
|
||||
|
||||
chown itender:itender -R /home/itender/
|
||||
adduser itender gpio
|
||||
|
||||
reboot now
|
||||
|
@ -1,5 +1,9 @@
|
||||
import GPIO from "rpi-gpio";
|
||||
import Container from "./database/Container";
|
||||
import debug from "debug";
|
||||
const log = debug("itender:gpio");
|
||||
|
||||
// Package is raspi-gpio in raspberrypi
|
||||
|
||||
export class MyGPIO {
|
||||
static setup(pin: number, direction): Promise<void> {
|
||||
@ -35,6 +39,7 @@ export class MyGPIO {
|
||||
}
|
||||
|
||||
static setupPins(): Promise<void> {
|
||||
log("Setting up GPIO-Pins...");
|
||||
return new Promise(async resolve => {
|
||||
let containers = await Container.find({});
|
||||
for (let c of containers) {
|
||||
|
@ -40,6 +40,7 @@ const wsApp = new WebsocketApp();
|
||||
|
||||
log("Check OK, starting...");
|
||||
await init();
|
||||
log("Init OK");
|
||||
setInterval(refresh, 1000 * 60);
|
||||
iTender.setStatus(iTenderStatus.READY);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user