gpiod

Version, currently master branch1 version
  • master branchlatestJan 5, 2024

github.com/SleepingInsomniac/gpiod.cr

Crystal bindings to libgpiod for general purpose input/output control

0 stars
0 dependents
License: MIT

Installation

# Add this to your shard.yml
dependencies:
  gpiod:
    github: SleepingInsomniac/gpiod.cr
    branch: master

master is a branch, not a release, so this tracks it rather than pinning a version.

Then run:

shards install

shard.yml

Crystal
>= 1.10.1
License
MIT
Author
Alex Clink

Dependencies

This version declares no dependencies.

README

GPIOD

Crystal bindings to LibGPIOD v2.1

Installation

Install version 2.1 of LibGPIOD:

wget -O - https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/snapshot/libgpiod-2.1.tar.gz | sudo tar xvz -C /opt
sudo ./autogen.sh --enable-tools=yes --prefix=/usr/local
sudo make
sudo make install

In your crystal project

  1. Add the dependency to your shard.yml file
dependencies:
  gpiod:
    github: sleepinginsomniac/gpiod.cr
  1. Install dependencies
shards install
  1. Require the lib in your source
require "gpiod"

Usage

See examples

Generate documentation with crystal docs

Contributing

  1. Fork it (https://github.com/SleepingInsomniac/gpiod.cr/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors