Metadata-Version: 2.1
Name: mcp23017
Version: 1.0.2
Summary: MCP23017 Library
Home-page: https://github.com/open-thngs/MCP23017-python
Author: Mirko Haeberlin
Author-email: mirko.haeberlin@open-things.de
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown

# MCP23017-python
MCP23017 GPIO-Expander Python Library for RaspberryPi

[MCP23017 Datasheet](http://ww1.microchip.com/downloads/en/devicedoc/20001952c.pdf)

## Features

currently implemented features:
*  set pin mode INPUT or OUTPUT
*  set pin mode of all pins
*  digital write pin HIGH or LOW
*  digital read pin state
*  digital read pin state of all pins
*  enable interrupt on a pin
*  enable interrupt on all pins
*  enable interrupt mirroring of BANK_A and BANK_B
*  read interrupt flags to see which pin triggered the interrupt
*  read the interrupt capture value of the pin when the interrupt happened

## Getting started

Setup a MCP23017 object
```
from mcp23017 import *
from i2c import I2C
import smbus

i2c = I2C(smbus.SMBus(1))  # creates a I2C Object as a wrapper for the SMBus
mcp = MCP23017(0x20, i2c)   # creates an MCP object with the given address
```

