pigpio-cr

Crystal bindings to pigpio for GPIO control on raspberry pi

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

Repository

pigpio-cr

Owner
Statistic
  • 0
  • 0
  • 0
  • 0
  • 0
  • about 2 years ago
  • November 13, 2022
License

MIT License

Links
Synced at

Sun, 22 Dec 2024 02:15:12 GMT

Languages