Try to find issue for #7 - Maybe gpio pins?

Took 8 minutes
This commit is contained in:
Tobias Hopp 2022-12-02 11:43:35 +01:00
parent 28be973244
commit f6d6ccc92a
3 changed files with 7 additions and 0 deletions

View File

@ -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

View File

@ -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) {

View File

@ -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);