1.1.0 • Published 5 years ago

@notweb/gpio v1.1.0

Weekly downloads
65
License
MIT
Repository
github
Last release
5 years ago

@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

1.0.2

3 years ago

1.1.0

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.0.1

5 years ago