I2C access with Node.js
Find a file
dependabot[bot] 9a42401109
Bump glob-parent from 5.1.1 to 5.1.2
Bumps [glob-parent](https://github.com/gulpjs/glob-parent) from 5.1.1 to 5.1.2.
- [Release notes](https://github.com/gulpjs/glob-parent/releases)
- [Changelog](https://github.com/gulpjs/glob-parent/blob/main/CHANGELOG.md)
- [Commits](https://github.com/gulpjs/glob-parent/compare/v5.1.1...v5.1.2)

---
updated-dependencies:
- dependency-name: glob-parent
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-12 18:19:15 +00:00
.github/workflows chore: update publish action 2021-02-06 17:14:47 +09:00
.eslintrc.js Feature/lint (#33) 2021-03-28 17:31:45 +09:00
.gitignore chore: use prepare 2021-02-06 17:30:53 +09:00
index.ts Feature/lint (#33) 2021-03-28 17:31:45 +09:00
LICENSE Create LICENSE 2019-10-18 22:02:46 +09:00
package.json 1.1.9 2021-04-19 18:08:53 +00:00
README.md docs: use @chirimen/adt7410 2019-10-28 01:10:25 +09:00
renovate.json chore: remove :maintainLockFilesWeekly 2021-02-06 17:35:05 +09:00
tsconfig.eslint.json Feature/lint (#33) 2021-03-28 17:31:45 +09:00
tsconfig.json enable noFallthroughCasesInSwitch 2020-02-12 02:41:06 +09:00
yarn.lock Bump glob-parent from 5.1.1 to 5.1.2 2021-06-12 18:19:15 +00:00

node-web-i2c

I2C access with Node.js

Usage

const { requestI2CAccess } = require("node-web-i2c");
const ADT7410 = require("@chirimen/adt7410");

const ADT7410_ADDR = 0x48;

async function main() {
  const i2cAccess = await requestI2CAccess();
  const port = i2cAccess.ports.get(1);
  const adt7410 = new ADT7410(port, ADT7410_ADDR);
  await adt7410.init();
  const temperature = await adt7410.read();
  console.log(`Temperature: ${temperature} ℃`);
}

main();

Document

Web I2C API