def __init__(self, pins, thresholds): super(RaspPi, self).__init__(pins, thresholds, "RPi") self.flow_sensor = GroveFlowSensor(self.pins['sensors']['flow-sensor']) self.sound_sensor = SoundSensor(self.pins['sensors']['sound-sensor'], self.thresholds['sound']) self.ultrasonic_ranger = UltraSonicRanger( self.pins['sensors']['ultrasonic-ranger'], self.thresholds['ultrasonic']) self.lcd = GroveRGB() self.buttons = {} self.leds = {} if (pins): for button in pins['buttons']: if pins['buttons'][button] > 0: self.buttons[button] = GroveButton(pins['buttons'][button], button) for led in pins['led']: if (pins['led'][led] > 0): self.leds[led] = GroveLED(pins['led'][led], led) self.print_to_screen('Simple Beer \n Service 4.0', RGB['orange']) for c in range(0, 255): self.lcd.setRGB(c, 255 - c, 0) time.sleep(0.01) self.lcd.setRGB(0, 255, 0) self.print_to_screen('IP Address: \n ' + Tools.get_ip_address(), [0, 128, 64]) time.sleep(10)