这是python3的mcp2221(a)hid库。
PyMCP2221A的Python项目详细描述
什么是。
这是一个用python编写的mcp2221(a)hid库。
mcp2221&mcp2221a在python中工作。
安装
这个库使用hitapi。
pip install hidapi
PYMCP221A安装
pip install PyMCP2221A
样品
从PYMCP221A导入PYMCP221A
mcp2221=pymcp2221a.pymcp2221a()
还有更多。SMBus(系统管理总线)兼容功能
从PYMCP221A导入SMBus
总线=smbus.smbus()
设置
示例
MCP2221 ADC:正常:
https://github.com/nonNoise/PyMCP2221A/blob/master/example/MCP2221_ADC.py
MCP2221 DAC:正常:
https://github.com/nonNoise/PyMCP2221A/blob/master/example/MCP2221_DAC.py
MCP2221 GPIO:正常:
https://github.com/nonNoise/PyMCP2221A/blob/master/example/MCP2221_GPIO.py
MCP2221中断:否:
MCP2221时钟:正常:
https://github.com/nonNoise/PyMCP2221A/blob/master/example/MCP2221_ClockOUT.py
MCP2221 I2C:正常:
https://github.com/nonNoise/PyMCP2221A/blob/master/example/MCP2221_i2cdetect.py
https://github.com/nonNoise/PyMCP2221A/blob/master/example/MCP2221_EEPROM_WriteReadTest.py
许可证
The MIT License (MIT) Copyright (c) 2017 Yuta Kitagami (kitagami@artifactnoise.com,@nonnoise)