pigpio-cr

Version, currently master branch1 version
  • master branchlatestNov 13, 2022

github.com/SleepingInsomniac/pigpio-cr

Crystal bindings to pigpio for GPIO control on raspberry pi

0 stars
0 dependents
License: MIT

Installation

# Add this to your shard.yml
dependencies:
  pigpio-cr:
    github: SleepingInsomniac/pigpio-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.6.0
License
MIT
Author
Alex Clink

Dependencies

This version declares no dependencies.

README

pigpio-cr

Crystal bindings to pigpio - https://github.com/joan2937/pigpio

Installation

  1. Add the dependency to your shard.yml:

    dependencies:
      pigpio-cr:
        github: SleepingInsomniac/pigpio-cr
  2. Run shards install

Usage

require "pigpio"

if status = LibPigpio.Initialize < 0
  # pigpio initialisation failed.
  puts "LibPigpio initialization failed: #{status}"
  exit
end

LibPigpio.SetMode(2, LibPigpio::PI_OUTPUT)

60.times do
  LibPigpio.Write(2, 1)
  sleep 0.5
  LibPigpio.Write(2, 0)
  sleep 0.5
end

Contributing

  1. Fork it (https://github.com/your-github-user/pigpio-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