Sha256: c6ddd62e64cdbc0c319186a3b8b4dc7f36e4ca3f1c3d803e21f682ff765dbece
Contents?: true
Size: 452 Bytes
Versions: 5
Compression:
Stored size: 452 Bytes
Contents
require 'artoo' connection :sphero, :adaptor => :sphero, :port => '127.0.0.1:4560' device :sphero, :driver => :sphero work do puts "Configuring..." sphero.detect_collisions every(3.seconds) do puts "Rolling..." sphero.roll 90, rand(360) unless sphero.collisions.empty? puts "----------" sphero.collisions.each do |c| puts c end puts "==========" sphero.async_messages.clear end end end
Version data entries
5 entries across 5 versions & 1 rubygems