Skip to content

muffag/rpi-gpio-sysfs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 = await createPin(18, 'in');
const status: boolean = await pin.read();

About

Access GPIO pins on Raspberry Pi via sysfs

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published