Open GoogleCodeExporter opened 9 years ago
Proposed solution was not correct, this one should work:
...
from webiopi.utils.types import toint
...
class PiFaceDigital():
def __init__(self, board=0):
board = toint(board)
mcp = MCP23S17(0, 0x20 + board)
mcp.writeRegister(mcp.getAddress(mcp.IODIR, 0), 0x00) # Port A as output
mcp.writeRegister(mcp.getAddress(mcp.IODIR, 8), 0xFF) # Port B as input
mcp.writeRegister(mcp.getAddress(mcp.GPPU, 0), 0x00) # Port A PU OFF
mcp.writeRegister(mcp.getAddress(mcp.GPPU, 8), 0xFF) # Port B PU ON
self.mcp = mcp
self.board = board
Original comment by andreas....@googlemail.com
on 21 Aug 2014 at 8:06
Original issue reported on code.google.com by
andreas....@googlemail.com
on 20 Aug 2014 at 8:58