Sha256: 71a510981a7857ef447779261904d123069905eff692e98facf223caeb71c896
Contents?: true
Size: 552 Bytes
Versions: 2
Compression:
Stored size: 552 Bytes
Contents
require 'artoo' # Circuit and schematic here: http://www.electrojoystick.com/tutorial/?page_id=285 connection :firmata, :adaptor => :firmata, :port => '/dev/ttyACM0' #connection :firmata, :adaptor => :firmata, :port => '127.0.0.1:4567' device :sonar, :driver => :maxbotix, :pin => 0, :interval => 0.5 device :board, :driver => :device_info work do on sonar, :range => :sonar_reading puts "Firmware name: #{board.firmware_name}" puts "Firmata version: #{board.version}" puts "starting sonar..." end def sonar_reading(*args) puts args end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
artoo-arduino-1.4.4 | examples/maxbotix.rb |
artoo-arduino-1.4.3 | examples/maxbotix.rb |