Commit ca45cafb authored by Constantin's avatar Constantin
Browse files

Blinker does all GPIO actions in

parent 006a3aa5
......@@ -6,6 +6,7 @@ import signal
class Blinker(threading.Thread):
def __init__(self, name, pin, pattern=[(False,60.0)]):
GPIO.setup(pin, GPIO.OUT)
self._name = name
self._pin = pin
......@@ -55,8 +56,6 @@ class LedActor:
self._threads = {}
for (name,pin) in self.ledPins.items():
logger.debug("Setting pin %d to output as \"%s\" LED, initial state: False" % (pin,name))
GPIO.setup(pin, GPIO.OUT)
GPIO.output(pin, False)
self._threads[name] = Blinker(name,pin)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment