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: Ruff

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

adafruit_circuitpython_mcp230xx-2.6.2.tar.gz (31.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

adafruit_circuitpython_mcp230xx-2.6.2-py3-none-any.whl (18.9 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for adafruit_circuitpython_mcp230xx-2.6.2.tar.gz
Algorithm Hash digest
SHA256 5c50bb8c326ea680c7f5784d0cdd9f3266c044db6b3d4fa93775ebe4e7485a3b
MD5 a8381aeef334a8bbf1379e008e4b760c
BLAKE2b-256 be1967dd951a9ccd9cfc24e8512883fa9574b7c131ba9d00341e34847716a545

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for adafruit_circuitpython_mcp230xx-2.6.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7efbc8b882a56274a144832eb66b0861edc3311061c9bffae5976736072b0909
MD5 becaa65931b225ac1b1b5d5f24421e8d
BLAKE2b-256 2edaa87cccc312c0fb196af0a7bf537576a7a698011dfdbf4e5ec80486a04ddc

See more details on using hashes here.

Supported by

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