Drivers

Artoo has a extensible system for connecting to hardware devices.

Keyboard


The Artoo adaptor for keyboard input.

How To Connect

For Arduino:

require 'artoo'

connection :keyboard, adaptor: :keyboard
device :keyboard, driver: :keyboard, connection: :keyboard
...

How To Use

Example using a Key.

require 'artoo'

connection :keyboard, adaptor: :keyboard
device :keyboard, driver: :keyboard, connection: :keyboard

work do
  on keyboard, :key => :keypress
end

def keypress(sender, key)
  puts key
end

Events

start_driver

Start driver and any required connections.

key

Gets triggered when we press a key on the keyboard.

  • keys supported - up arrow, down arrow, left arrow, right arrow, esc and any alphanumeric characters.

Compatibility