Introduction
CircuitPython module for the MCP23017/08 I2C and MCP23S17/08 SPI I/O extenders.
Dependencies
This driver depends on:
Please ensure all dependencies are available on the CircuitPython filesystem. This is easily achieved by downloading the Adafruit library and driver bundle.
Installing from PyPI
On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally from PyPI. To install for current user:
pip3 install adafruit-circuitpython-mcp230xx
To install system-wide (this may be required in some cases):
sudo pip3 install adafruit-circuitpython-mcp230xx
To install in a virtual environment in your current project:
mkdir project-name && cd project-name
python3 -m venv .venv
source .venv/bin/activate
pip3 install adafruit-circuitpython-mcp230xx
Usage Example
See examples/mcp230xx_simpletest.py for a demo of the usage.
Documentation
API documentation for this library can be found on Read the Docs.
For information on building library documentation, please check out this guide.
Warning
Some people have reported an undocumented bug that can potentially corrupt the I2C bus. It occurs if an MCP230XX input pin state changes during I2C readout. This should be very rare. For more information, see this forum post and this knowledge base article .
Contributing
Contributions are welcome! Please read our Code of Conduct before contributing to help this project stay welcoming.
Table of Contents
mcp230xx
MCP23XXX
mcp230xx
MCP230XX
mcp23008
MCP23008
mcp23016
MCP23016
mcp23017
MCP23017
MCP23017.clear_inta()
MCP23017.clear_intb()
MCP23017.clear_ints()
MCP23017.default_value
MCP23017.get_pin()
MCP23017.gpio
MCP23017.gpioa
MCP23017.gpiob
MCP23017.gppu
MCP23017.gppua
MCP23017.gppub
MCP23017.int_cap
MCP23017.int_capa
MCP23017.int_capb
MCP23017.int_flag
MCP23017.int_flaga
MCP23017.int_flagb
MCP23017.interrupt_configuration
MCP23017.interrupt_enable
MCP23017.io_control
MCP23017.iodir
MCP23017.iodira
MCP23017.iodirb
MCP23017.ipol
MCP23017.ipola
MCP23017.ipolb
mcp23sxx
MCP23SXX
MCP23S08
MCP23S08
MCP23S17
MCP23S17
MCP23S17.clear_inta()
MCP23S17.clear_intb()
MCP23S17.clear_ints()
MCP23S17.default_value
MCP23S17.get_pin()
MCP23S17.gpio
MCP23S17.gpioa
MCP23S17.gpiob
MCP23S17.gppu
MCP23S17.gppua
MCP23S17.gppub
MCP23S17.int_flag
MCP23S17.int_flaga
MCP23S17.int_flagb
MCP23S17.interrupt_configuration
MCP23S17.interrupt_enable
MCP23S17.io_control
MCP23S17.iodir
MCP23S17.iodira
MCP23S17.iodirb
MCP23S17.ipol
MCP23S17.ipola
MCP23S17.ipolb
digital_inout
DigitalInOut