This package has been deprecated

Author message:

This project has been renamed to node-web-gpio. Install using node-web-gpio instead.

@notweb/gpio
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

@notweb/gpio

GPIO access with Node.js

Usage

const { requestGPIOAccess } = require("@notweb/gpio");
const { promisify } = require("util");
const sleep = promisify(setTimeout);

async function main() {
  const gpioAccess = await requestGPIOAccess();
  const port = gpioAccess.ports.get(26);

  await port.export("out");

  for (;;) {
    await port.write(1);
    await sleep(1000);
    await port.write(0);
    await sleep(1000);
  }
}

main();

Document

Web GPIO API

Readme

Keywords

none

Package Sidebar

Install

npm i @notweb/gpio

Weekly Downloads

3

Version

1.1.0

License

MIT

Unpacked Size

15.1 kB

Total Files

7

Last publish

Collaborators

  • kou029w