Sha256: 2877b1c8cd5bafc4589055afd4243980244007e68d8bfa5551ba1c5ea517a93d

Contents?: true

Size: 349 Bytes

Versions: 1

Compression:

Stored size: 349 Bytes

Contents

require 'em-websocket-client'
require 'json'
require 'ostruct'

require 'myo/version'
require 'myo/client'

module Myo
  MYO_API_VERSION = 3
  SOCKET_URL = "ws://127.0.0.1:10138/myo/#{MYO_API_VERSION}"

  # Define event handler for each Myo armband
  def self.connect
    client = Client.new(SOCKET_URL)
    yield(client)
    client.start
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
myo-ruby-0.2.0 lib/myo.rb