gate: start reorder

Signed-off-by: Thomas Klaehn <thomas.klaehn@u-blox.com>
This commit is contained in:
Thomas Klaehn
2017-03-30 11:05:31 +02:00
parent 0870736845
commit c1012382f2
27 changed files with 69 additions and 154 deletions

24
source/engine/__init__.py Normal file
View File

@@ -0,0 +1,24 @@
from gpio import Gpio
class Engine:
def __init__(self, gpio_1 = 13, gpio_2 = 19):
self.gpio_1 = Gpio(gpio_1)
self.gpio_2 = Gpio(gpio_2)
self.gpio_1.export()
self.gpio_1.direction(Gpio.DIRECTION_OUT)
self.gpio_2.export()
self.gpio_2.direction(Gpio.DIRECTION_OUT)
self.stop()
def stop(self):
self.gpio_1.set(0)
self.gpio_2.set(0)
def up(self):
self.gpio_1.set(1)
self.gpio_2.set(0)
def down(self):
self.gpio_1.set(0)
self.gpio_2.set(1)