Connect to Myo armband in Ruby
You must start Myo Connect.app first.
require 'myo'
Myo.connect do |myo|
myo.on :connected do
puts "Myo connected!"
end
myo.on :pose do |pose, edge|
puts "#{pose}: #{edge}"
end
myo.on :periodic do |orientation|
puts orientation.accel.x
end
end
Add this line to your application's Gemfile:
gem 'myo-ruby'
And then execute:
$ bundle
Or install it yourself as:
$ gem install myo-ruby
- Fork it ( https://github.com/uetchy/myo-ruby/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