Sha256: 088858cb5b374875383a66c4aecbf1f32d9f46a9d2dfc2a6a0694fe39a4dbaad

Contents?: true

Size: 469 Bytes

Versions: 2

Compression:

Stored size: 469 Bytes

Contents

require 'artoo'

# Circuit and schematic here: http://arduino.cc/en/Tutorial/Blink

connection :firmata, :adaptor => :firmata, :port => '/dev/ttyACM0' #linux
#connection :firmata, :adaptor => :firmata, :port => '127.0.0.1:8023'
device :board, :driver => :device_info
device :led, :driver => :led, :pin => 13

work do
  puts "Firmware name: #{board.firmware_name}"
  puts "Firmata version: #{board.version}"

  every 1.second do
    led.on? ? led.off : led.on
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
artoo-arduino-1.4.4 examples/blink_led.rb
artoo-arduino-1.4.3 examples/blink_led.rb