Skip to main content

MCP23017 Library

Project description

MCP23017-python

MCP23017 GPIO-Expander Python Library for RaspberryPi

MCP23017 Datasheet

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

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

mcp23017-1.0.2.tar.gz (2.5 kB view details)

Uploaded Source

Built Distribution

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

mcp23017-1.0.2-py3-none-any.whl (1.6 kB view details)

Uploaded Python 3

File details

Details for the file mcp23017-1.0.2.tar.gz.

File metadata

  • Download URL: mcp23017-1.0.2.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for mcp23017-1.0.2.tar.gz
Algorithm Hash digest
SHA256 db8f4f83240a4d81977a1d1c64331b67f206176fcd26e429cde9d08fc8d7cbb8
MD5 73c25f661a8bac47c528c5d59731d8ec
BLAKE2b-256 2d990e5f4a1c6a6d5501b1bb0f0eecd2a1fa55a0e4d3e3d527ccc2c053263ddf

See more details on using hashes here.

File details

Details for the file mcp23017-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: mcp23017-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 1.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for mcp23017-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f27d67395ea49b6e4dec454effaa1f49d4f73e141585ba1ffd2a925256783ef2
MD5 0317996c7c42e0d4115837c79bc4c271
BLAKE2b-256 7890ae3ed7b9044d166724690d3052cdfff1a1f1a873a0fa3391f79c96209b96

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