From 0736cbbe81e8c2f94eee789439f80921ae825acf Mon Sep 17 00:00:00 2001 From: klonfish Date: Mon, 18 May 2015 14:31:29 +0200 Subject: [PATCH] Implemented Schauzeichen --- tuitest.py | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/tuitest.py b/tuitest.py index 2fecc05..adc7197 100644 --- a/tuitest.py +++ b/tuitest.py @@ -9,7 +9,7 @@ class TelefonapparatPinConfiguration(object): self.pin_nsa = 11 self.pin_nsi = 13 self.pin_gabelschalter = 15 - self.pin_schauzeichen = 32 + self.pin_schauzeichen = 12 self.pin_wecker_enable = 16 self.pin_wecker_a = 18 self.pin_wecker_b = 19 @@ -92,8 +92,7 @@ class TelefonapparatUserInterface(object): self.__weckt = False def set_schauzeichen(self, enabled): - raise Exception('Not implemented.') - + gpio.output(self.__pinconfig.pin_wecker_a, 1 if enabled else 0) if __name__ == '__main__': gpio.setmode(gpio.BOARD) @@ -105,6 +104,23 @@ if __name__ == '__main__': t.add_nummernschalter_callback(dailed) + t.set_schauzeichen(true) + time.sleep(0.5) + t.set_schauzeichen(false) + time.sleep(0.5) + t.set_schauzeichen(true) + time.sleep(0.5) + t.set_schauzeichen(false) + time.sleep(0.5) + t.set_schauzeichen(true) + time.sleep(0.5) + t.set_schauzeichen(false) + time.sleep(0.5) + t.set_schauzeichen(true) + time.sleep(0.5) + t.set_schauzeichen(false) + time.sleep(0.5) + t.set_wecker(True) time.sleep(20) t.set_wecker(False)