Drivers

Artoo has a extensible system for connecting to hardware devices.

Pebble


Allows user to interact with Artoo devices using a Pebble smart watch.

How To Connect

require 'artoo'

connection :pebble, :adaptor => :pebble
device     :watch,  :driver  => :pebble, :name => 'pebble'
...

How To Use

Example of receiving events from Pebble smart watch.

require 'artoo'

connection :pebble, :adaptor => :pebble
device     :watch,  :driver  => :pebble, :name => 'pebble'

api :host => '0.0.0.0', :port => '8080'

name 'pebble'

def button_push(*data)
  unless data[1].nil?
    p " button pushed"
  end
end

work do
  pebble.send_notification("Hello Pebble!")
  on pebble, :button => :button_push
end

Commands

message_queue

Used to add or access the queue of strings being passed to the Pebble watch.

Returns

Array with all message strings

last_message

Returns and removes the string with the last message from the queue of messages being passed with the Pebble watch.

Returns

String with the last message on the queue.

Events

start_driver

Starts the driver.

Compatibility