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.
npm install rpi-gpio-sysfs
import { createPin } from 'rpi-gpio-sysfs';
const pin = await createPin(18, 'out');
await pin.write(true);
import { createPin } from 'rpi-gpio-sysfs';
const pin = await createPin(18, 'in');
const status: boolean = await pin.read();