pi-gpio
Super-comfortable access to a Raspberry Pi's GPIO pins.
In contrast to the gpio
shard, this one utilizes the WiringPi library
which is available as part of Raspbian/Raspberry Pi OS.
Installation
-
Add the dependency to your
shard.yml
:dependencies: pi-gpio: github: mastoryberlin/pi-gpio
-
Run
shards install
Usage
require "pi-gpio"
Pi.gpio[3].as_output
pin = Pi.gpio[5]
pin.as_input
while pin.high?
sleep 50.milliseconds
end
Pi.gpio[3].high
Development
TODO Write development instructions here
Contributing
- Fork it (https://github.com/mastoryberlin/pi-gpio/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
- your-name-here - creator and maintainer