{"id":20563363,"url":"https://github.com/pilotak/python-mcp2221","last_synced_at":"2025-04-14T14:42:38.351Z","repository":{"id":53207586,"uuid":"354506789","full_name":"pilotak/python-mcp2221","owner":"pilotak","description":"Python driver for MCP2221A","archived":false,"fork":false,"pushed_at":"2025-01-27T02:29:40.000Z","size":47,"stargazers_count":4,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-28T03:41:20.166Z","etag":null,"topics":["adc","dac","gpio","hid","library","mcp2221","mcp2221a","python","usb"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pilotak.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-04T09:43:50.000Z","updated_at":"2024-12-16T06:43:14.000Z","dependencies_parsed_at":"2024-03-12T19:44:30.388Z","dependency_job_id":"8cfd7a66-b0a4-4844-aba7-85b25724f1d4","html_url":"https://github.com/pilotak/python-mcp2221","commit_stats":{"total_commits":19,"total_committers":1,"mean_commits":19.0,"dds":0.0,"last_synced_commit":"08fd78f6c952fe0953cc7a42ba4710665a70ddcd"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pilotak%2Fpython-mcp2221","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pilotak%2Fpython-mcp2221/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pilotak%2Fpython-mcp2221/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pilotak%2Fpython-mcp2221/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pilotak","download_url":"https://codeload.github.com/pilotak/python-mcp2221/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248898621,"owners_count":21179805,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adc","dac","gpio","hid","library","mcp2221","mcp2221a","python","usb"],"created_at":"2024-11-16T04:17:50.543Z","updated_at":"2025-04-14T14:42:38.320Z","avatar_url":"https://github.com/pilotak.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Python driver for MCP2221/A\n[![Build](https://github.com/pilotak/python-mcp2221/actions/workflows/validate.yaml/badge.svg)](https://github.com/pilotak/python-mcp2221/actions/workflows/validate.yaml)\n[![PyPI](https://img.shields.io/pypi/v/mcp2221)](https://pypi.org/project/mcp2221/)\n\n## Examples\n\nRead GP0\n```python\nfrom MCP2221 import MCP2221\n\nmcp2221 = MCP2221.MCP2221()\nmcp2221.InitGP(0, MCP2221.TYPE.INPUT)\nprint(mcp2221.ReadGP(0))\n```\n\nWrite GP0\n```python\nfrom MCP2221 import MCP2221\n\nmcp2221 = MCP2221.MCP2221()\nmcp2221.InitGP(0, MCP2221.TYPE.OUTPUT)\nprint(mcp2221.WriteGP(0, 1))\n```\n\nRead ADC on GP1\n```python\nfrom MCP2221 import MCP2221\n\nmcp2221 = MCP2221.MCP2221()\nmcp2221.InitGP(1, MCP2221.TYPE.ADC)\nmcp2221.SetADCVoltageReference(MCP2221.VRM.VDD)\nprint(mcp2221.ReadADC(1))\n```\n\nWrite DAC on GP2\n```python\nfrom MCP2221 import MCP2221\n\nmcp2221 = MCP2221.MCP2221()\nmcp2221.InitGP(2, MCP2221.TYPE.DAC)\nmcp2221.SetDACVoltageReference(MCP2221.VRM.REF_2_048V)\nmcp2221.WriteDAC(12)\n```\n\n## Tests\n```sh\npip install pytest pytest-cov\npytest tests/ --doctest-modules --cov=MCP2221\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpilotak%2Fpython-mcp2221","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpilotak%2Fpython-mcp2221","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpilotak%2Fpython-mcp2221/lists"}