Sha256: 0c949a6a384bf1d0d18c0ed8dd24e0062d7294247da57dc328282124c6406948

Contents?: true

Size: 265 Bytes

Versions: 23

Compression:

Stored size: 265 Bytes

Contents

require 'artoo'

connection :sphero, :adaptor => :sphero, :port => '127.0.0.1:4569'
device :sphero, :driver => :sphero

work do
  every(1.seconds) do
    puts "Rolling..."
    sphero.set_color(rand(255),rand(255),rand(255))
    sphero.roll 20, rand(360)
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
artoo-1.6.7 examples/sphero_color.rb
artoo-1.6.6 examples/sphero_color.rb
artoo-1.6.5 examples/sphero_color.rb
artoo-1.6.4 examples/sphero_color.rb
artoo-1.6.3 examples/sphero_color.rb
artoo-1.6.2 examples/sphero_color.rb
artoo-1.6.1 examples/sphero_color.rb
artoo-1.6.0 examples/sphero_color.rb
artoo-1.5.0 examples/sphero_color.rb
artoo-1.4.1 examples/sphero_color.rb
artoo-1.4.0 examples/sphero_color.rb
artoo-1.3.0 examples/sphero_color.rb
artoo-1.2.2 examples/sphero_color.rb
artoo-1.2.1 examples/sphero_color.rb
artoo-1.2.0 examples/sphero_color.rb
artoo-1.1.1 examples/sphero_color.rb
artoo-1.1.0 examples/sphero_color.rb
artoo-1.1.0.pre examples/sphero_color.rb
artoo-1.0.0 examples/sphero_color.rb
artoo-1.0.0.rc4 examples/sphero_color.rb