1.0.1 • Published 4 years ago

rpi-gpio-sysfs v1.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

rpi-gpio-sysfs

Basic access to GPIO pins via sysfs in Node.js. This package has native TypeScript support and uses a Promise-based API.

The library has been tested to work with the Compute Module 3, other Raspberry Pi's should work but will not be officially supported.

Installation

npm install rpi-gpio-sysfs

Usage

Write

import { createPin } from 'rpi-gpio-sysfs';

const pin = await createPin(18, 'out');

await pin.write(true);

Read

import { createPin } from 'rpi-gpio-sysfs';

const pin = createPin(18, 'in');

const status: boolean = await pin.read();
1.0.1

4 years ago

1.0.0

4 years ago

0.1.1

5 years ago