Example #1
0
 def __init__(self):
     self.saks_gpio_init()
     self.buzzer = entities.Buzzer(PINS.BUZZER, GPIO.LOW)
     self.ledrow = entities.LedRow(PINS.LEDS, GPIO.LOW)
     self.ds18b20 = entities.DS18B20(PINS.DS18B20)
     self.digital_display = entities.DigitalDisplay({'seg': PINS.DIGITAL_DISPLAY, 'sel': PINS.DIGITAL_DISPLAY_SELECT}, GPIO.LOW)
     self.dip_switch = entities.DipSwitch2Bit([PINS.DIP_SWITCH_1, PINS.DIP_SWITCH_2], GPIO.LOW)
     self.dip_switch.register(self)
     self.tactrow = entities.TactRow([PINS.TACT_LEFT, PINS.TACT_RIGHT], GPIO.LOW)
     for t in self.tactrow.items:
         t.register(self)
Example #2
0
 def __init__(self):
     self.saks_gpio_init()
     self.buzzer = entities.Buzzer(PINS.BUZZER, GPIO.LOW)
     self.ledrow = entities.Led74HC595(
         {
             'ds': PINS.IC_74HC595_DS,
             'shcp': PINS.IC_74HC595_SHCP,
             'stcp': PINS.IC_74HC595_STCP
         }, GPIO.HIGH)
     self.ds18b20 = entities.DS18B20(PINS.DS18B20)
     self.digital_display = entities.DigitalDisplayTM1637(
         {
             'di': PINS.IC_TM1637_DI,
             'clk': PINS.IC_TM1637_CLK
         }, GPIO.HIGH)
     self.dip_switch = entities.DipSwitch2Bit(
         [PINS.DIP_SWITCH_1, PINS.DIP_SWITCH_2], GPIO.LOW)
     self.dip_switch.register(self)
     self.tactrow = entities.TactRow([PINS.TACT_LEFT, PINS.TACT_RIGHT],
                                     GPIO.LOW)
     for t in self.tactrow.items:
         t.register(self)