CubiePin
Control GPIO pins on a CubieBoard 2 running Cubian.
This is a work in progress and may contain bugs and incomplete features.
For a list of the pins you can use visit the GPIO Introduction page
of the Cubian wiki.
Installation
If you do not have Ruby you can install 1.9.3 on Cubian by running:
sudo apt-get update
sudo apt-get install ruby ruby-dev
Add this line to your application's Gemfile:
gem 'cubie_pin'
And then execute:
$ bundle
Or install it yourself as:
$ gem install cubie_pin
Usage
To enable a pin for output:
pin = CubiePin::Pin.new(:pin => 61, :direction => :out)
Modify the value:
pin.on
pin.off
Read the current value of the pin:
pin.read
pin.value
pin.on?
pin.off?
Contributing
- Fork it ( https://github.com/[my-github-username]/cubie_pin/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