Platforms

Artoo has a extensible system for connecting to hardware devices.

Joysticks


Repository Issues

You can use Artoo with a PS3 game controller, an XBox360 game controller, or any other USB joystick or game controller that is compatible with Simple DirectMedia Layer (SDL).

+ info about Simple DirectMedia Layer click here

How To Install

Installing artoo with arduino support is pretty easy using ruby gems.

gem install artoo-joystick

How To Use

This small program receives joystick and button press events from an XBox360 game controller.

require 'artoo'

connection :joystick, :adaptor => :joystick
device :joystick, :driver => :xbox360, :connection => :joystick, :interval => 0.1

work do
  on controller, :joystick => proc { |*value|
    puts "joystick #{value[1][:s]} x:#{value[1][:x]} y:#{value[1][:y]}"
  }
  on controller, :button_a => proc { |*value|
    puts "ayyyy!"
  }
  on controller, :button_b => proc { |*value|
    puts "bee!"
  }
  on controller, :button_x => proc { |*value|
    puts "exxx!"
  }
  on controller, :button_y => proc { |*value|
    puts "why!"
  }
end

How To Connect

Plug your USB joystick or game controller into your USB port. If your device is supported by SDL, you are now ready.

Drivers

There are 3 driver for different joysticks, as listed below: