コード例 #1
0
ファイル: powerModule.py プロジェクト: scareface972/weio
    def __init__(self, port):
        if (port>1):
            sys.stderr.write("Error! PowerModule can be only on ports 0 or 1")
        else :
            self.spi = SPILib(0) # init SPI on port 0 (pins : 2,3,4)

            if (port==0):
                self.latchPin = 5
            else :
                self.latchPin = 13

            self.output = 0
            # Pin mapping
            self.mapping = [8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 7]