예제 #1
0
 def initPins():
     GPIO.setmode(GPIO.BOARD)
     raspPiPins = pins.getLightControlLEDs()
     for rppNum in raspPiPins:
         print "Initializing pin :: " + rppNum
         GPIO.setup(rppNum, GPIO.OUT, initial=GPIO.LOW)
     print "FINISHED PIN INIT!!!"
예제 #2
0
    def setPins(self, num):
        print "setting pins, output should be \"" + self.pinSetting + "\" (" + str(self.numberOfLightsOn) + ")"
        pinstates = self.pinSetting.split(',')
        print "pins :: " + str(pinstates)
        
        for p in pinstates:
            print "pin ::::: " + str(p)

        raspPiPins = pins.getLightControlLEDs()
        print "calling pins class :: >> " + str(raspPiPins)
        
        index = 0
        for rppNum in raspPiPins:
            self.applyPin(rppNum, pinstates[index])
            index += 1