How To Install
Installing artoo with spark support is pretty easy.
gem install artoo-spark
How To Use
You will need to have a Spark device, it's device ID (found via the build tool on Spark's website), and an access token from a registered Spark account.
This small program lets you turn on or off a LED for every 1 sec.
require 'artoo' connection :spark, :adaptor => :spark, :access_token => 'XYZABC123', :device_id => '123ABC456' device :led, :driver => :led, :pin => 'D0' work do every(1.second) do led.toggle end end
How To Connect
Once your Spark is connected via Wifi, you're done. It should keep itself connected, and your Artoo program should be able to connect to it via the Internet, using the access token that Spark has given you.
Available drivers for the spark platform are listed below, the drivers contain detailed documentation and examples of what kind physical computing (using artoo and ruby) you could be doing: