gpio 0.2.0 copy "gpio: ^0.2.0" to clipboard
gpio: ^0.2.0 copied to clipboard

Linux GPIO from pure Dart over the /dev/gpiochip v2 ABI — no native library. Kernel debounce, edge-event streams with kernel timestamps, and dropped-edge detection.

example/README.md

Examples #

Both take an optional chip label and line offset:

dart run example/blink.dart pinctrl-rp1 17
dart run example/button.dart pinctrl-rp1 17

Defaults are pinctrl-rp1 (a Raspberry Pi 5) and line 17. Find your chip's label with gpiodetect, or from Dart:

for (final chip in GpioChip.list()) {
  print('${chip.info.name}: ${chip.info.label} (${chip.info.lineCount} lines)');
  chip.close();
}
example what it shows
blink.dart claiming an output, driving it, releasing it cleanly
button.dart pull-up + activeLow, kernel debounce, the edge-event stream, and reacting to dropped edges

Both need access to /dev/gpiochip* — see the udev rule in the top-level README, or run them as root.

0
likes
160
points
162
downloads

Documentation

API reference

Publisher

verified publisheraquiles.dev

Weekly Downloads

Linux GPIO from pure Dart over the /dev/gpiochip v2 ABI — no native library. Kernel debounce, edge-event streams with kernel timestamps, and dropped-edge detection.

Repository (GitHub)
View/report issues

Topics

#gpio #linux #embedded #raspberry-pi #ffi

License

MIT (license)

Dependencies

ffi, meta

More

Packages that depend on gpio