
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
gpiod-client
Advanced tools
Intuitive, fun to use, object-oriented implementation.
Thanks to C++ bindings this package is using kernel level GPIO access via libgpiod (see https://kernel.googlesource.com/pub/scm/libs/libgpiod/libgpiod/+/v0.2.x/README.md). The library offers accuracy and reliability. It can also register changes as quick as 1 microsecond or less and does not require extensive pooling.
Written in TypeScript.
sudo apt update
sudo apt-get install libgpiod-dev
yarn add gpiod-client
https://kodmax.github.io/gpiod-client/classes/GPIOController.html
The input events are collected at kernel level. Each event has a high resolution timer timestamp attached. The precision goes to nanoseconds level.
Each input line can be configured with different pooling interval to read those events. Regardless of the pooling interval the precision remains the same and no events are lost. If edge events are not needed, no pooling is required.
import { GPIOController } from 'gpiod-client'
const gpio = new GPIOController('gpiochip0', 'input27')
// look for both falling and rising edges
// read the events queue from linux kernel every 100ms
const line2 = gpio.requestLineAsInput(2, 'both', 100)
// debounce the mechanical switch noise for 50ms
// trigger a hold event after 300ms press and then after 1 second press
const button = line2.createDebouncer(50, 0, [300, 1000])
console.log('Hit the button!')
button.addListener('press', () => {
console.log('press')
})
button.addListener('release', () => {
console.log('release')
})
button.addListener('hold', ev => {
console.log('hold', ev.time, 'ms')
})
import { GPIOController } from 'gpiod-client'
const gpio = new GPIOController('gpiochip0', 'blink17')
const led = gpio.requestLineAsOutput(17, 1)
let i = 0
setInterval(() => {
led.setValue(++i % 2 ? 1 : 0)
}, 50)
import { GPIOController } from 'gpiod-client'
const gpio = new GPIOController('gpiochip0', 'blink17')
const led = gpio.requestLineAsOutput(17, 0)
setInterval(() => {
led.trigger(1, 10000)
}, 1000)
FAQs
Intuitive, fun to use, object-oriented implementation.
We found that gpiod-client demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.