@ -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) {
|
||||
|
Reference in New Issue
Block a user