Skip to main content

CircuitPython library for controlling a MCP23008 or MCP23017 I2C GPIO expander.

Project description

Introduction

Documentation Status Discord Build Status Code Style: Black

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Built Distribution

File details

Details for the file adafruit_circuitpython_mcp230xx-2.5.15.tar.gz.

File metadata

File hashes

Hashes for adafruit_circuitpython_mcp230xx-2.5.15.tar.gz
Algorithm Hash digest
SHA256 9c9b5c75174e4ae9dbadf2f24288358e05c7adf59203021b689958d87b9ba776
MD5 768a934532bb552c15be0a9201773528
BLAKE2b-256 b71e3806ce56649a46d7fd455d39ce0f0f2ecc747012490e9e75d71a54bf6678

See more details on using hashes here.

File details

Details for the file adafruit_circuitpython_mcp230xx-2.5.15-py3-none-any.whl.

File metadata

File hashes

Hashes for adafruit_circuitpython_mcp230xx-2.5.15-py3-none-any.whl
Algorithm Hash digest
SHA256 fcfa62bd647d71639bffb0e0d5f795d49f415503bbd598f41ae6f1e12c772ace
MD5 4867335fae0a95b262d2a81967e8ee6a
BLAKE2b-256 07a9f9e859f4073224a8b4b15f50312bbbfe95baa450604e93380190f00f10a8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page