Browse Source

Implemented Schauzeichen

pull/1/head
klonfish 10 years ago
parent
commit
0736cbbe81
  1. 22
      tuitest.py

22
tuitest.py

@ -9,7 +9,7 @@ class TelefonapparatPinConfiguration(object):
self.pin_nsa = 11 self.pin_nsa = 11
self.pin_nsi = 13 self.pin_nsi = 13
self.pin_gabelschalter = 15 self.pin_gabelschalter = 15
self.pin_schauzeichen = 32 self.pin_schauzeichen = 12
self.pin_wecker_enable = 16 self.pin_wecker_enable = 16
self.pin_wecker_a = 18 self.pin_wecker_a = 18
self.pin_wecker_b = 19 self.pin_wecker_b = 19
@ -92,8 +92,7 @@ class TelefonapparatUserInterface(object):
self.__weckt = False self.__weckt = False
def set_schauzeichen(self, enabled): def set_schauzeichen(self, enabled):
raise Exception('Not implemented.') gpio.output(self.__pinconfig.pin_wecker_a, 1 if enabled else 0)
if __name__ == '__main__': if __name__ == '__main__':
gpio.setmode(gpio.BOARD) gpio.setmode(gpio.BOARD)
@ -105,6 +104,23 @@ if __name__ == '__main__':
t.add_nummernschalter_callback(dailed) 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) t.set_wecker(True)
time.sleep(20) time.sleep(20)
t.set_wecker(False) t.set_wecker(False)

Loading…
Cancel
Save