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.3.tar.gz (4.6 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.3-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mcp23017-1.0.3.tar.gz
  • Upload date:
  • Size: 4.6 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.3.tar.gz
Algorithm Hash digest
SHA256 ff13daf0f97d654c10a040eb5e5e459a5c176bfedf9c1af42ca191c7efc7c4a0
MD5 799b0cd657272f3afac3865d9da149ff
BLAKE2b-256 d9d8ed1a43bfa0fa0844aff9c853546c887154f31b770fbc07ccb212bd364404

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mcp23017-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 4.3 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9d55e078c68ce4e7118cfb580a10a8c8425b4d1026268b530b51135c0e773680
MD5 f5a0d0068c2e9bf687b38ec30a3df5b1
BLAKE2b-256 8422f22f7c82c2fec53a387375a5b5d3310f48dbcaf294b0f9b919a1d8cc6ee6

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