gpiod.cr

Crystal bindings to libgpiod for general purpose input/output control

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

Repository

gpiod.cr

Owner
Statistic
  • 0
  • 0
  • 0
  • 0
  • 0
  • 4 months ago
  • January 5, 2024
License

MIT License

Links
Synced at

Wed, 08 May 2024 23:23:07 GMT

Languages