Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/johntalton/i2c-bus-mcp2221
A I2CBus implementation over mcp2221 I²C interface
https://github.com/johntalton/i2c-bus-mcp2221
i2c i2c-bus mcp2221 mcp2221a
Last synced: about 1 month ago
JSON representation
A I2CBus implementation over mcp2221 I²C interface
- Host: GitHub
- URL: https://github.com/johntalton/i2c-bus-mcp2221
- Owner: johntalton
- License: mit
- Created: 2020-12-22T02:44:34.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-03-20T07:02:47.000Z (9 months ago)
- Last Synced: 2024-03-22T23:52:34.461Z (9 months ago)
- Topics: i2c, i2c-bus, mcp2221, mcp2221a
- Language: TypeScript
- Homepage:
- Size: 46.9 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# I²C Bus MCP2221
An [I²C interface](https://github.com/johntalton/and-other-delights) `I2CBus` implementation over [MCP2221](https://github.com/johntalton/mcp2221)
[![npm Version](http://img.shields.io/npm/v/@johntalton/i2c-bus-mcp2221.svg)](https://www.npmjs.com/package/@johntalton/i2c-bus-mcp2221)
![GitHub package.json version](https://img.shields.io/github/package-json/v/johntalton/i2c-bus-mcp2221)
![CI](https://github.com/johntalton/i2c-bus-mcp2221/workflows/CI/badge.svg?branch=master&event=push)
![GitHub](https://img.shields.io/github/license/johntalton/i2c-bus-mcp2221)
[![Downloads Per Month](http://img.shields.io/npm/dm/@johntalton/i2c-bus-mcp2221.svg)](https://www.npmjs.com/package/@johntalton/i2c-bus-mcp2221)
![GitHub last commit](https://img.shields.io/github/last-commit/johntalton/i2c-bus-mcp2221)#
```js
import { MCP2221 } from '@johntalton/mcp2221'
import { I2CBusMCP2221 } from '@johntalton/i2c-bus-mcp2221'const hidDevice = /* navigator.hid.request ... */
const source = new WebHIDStreamSource(hidDevice) // or NodeHIDStreamSource
const device = MCP2221.from(source)
const bus = I2CBusMCP2221.from(device)// bus.readI2CBlock(...) and friends
```