This is a Microchip MCP2221(A) HID Library in python.
MCP2221 & MCP2221A work in Python.
日本語はこちら
https://github.com/nonNoise/PyMCP2221A/blob/master/README_JP.rst
PyMCP2221A Install
pip install PyMCP2221A
or
git clone https://github.com/nonNoise/PyMCP2221A.git
cd pypi
sudo python setup.py build
sudo python setup.py install
from PyMCP2221A import PyMCP2221A
mcp2221 = PyMCP2221A.PyMCP2221A()
from PyMCP2221A import SMBus
bus = SMBus.SMBus()
MCP2221 ADC : OK :
https://github.com/nonNoise/PyMCP2221A/blob/master/example/MCP2221_ADC.py
MCP2221 DAC : OK :
https://github.com/nonNoise/PyMCP2221A/blob/master/example/MCP2221_DAC.py
MCP2221 GPIO : OK :
https://github.com/nonNoise/PyMCP2221A/blob/master/example/MCP2221_GPIO.py
MCP2221 Interrupt : No :
MCP2221 Clock : OK :
https://github.com/nonNoise/PyMCP2221A/blob/master/example/MCP2221_ClockOUT.py
MCP2221 I2C : OK :
Note you can change the system enviornment variable for I2C read delay if you are running into I2C problems.
import os os.environ["MCP2221_I2C_SLEEP"] = "0.05"
The MIT License (MIT) Copyright (c) 2017 Yuta Kitagami ([email protected],@nonnoise)