pigpio-cr
Crystal bindings to pigpio - https://github.com/joan2937/pigpio
Installation
-
Add the dependency to your
shard.yml
:dependencies: pigpio-cr: github: SleepingInsomniac/pigpio-cr
-
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
- Fork it (https://github.com/your-github-user/pigpio-cr/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Contributors
- Alex Clink - creator and maintainer