Sha256: e8d8e8391f6181d9016bd829076fcbcc0a90bf340f93d62748963a7ef893dbd3

Contents?: true

Size: 535 Bytes

Versions: 18

Compression:

Stored size: 535 Bytes

Contents

#!/usr/bin/env ruby
$:.unshift File.expand_path '../../lib', File.dirname(__FILE__)
require 'rubygems'
require 'arduino_firmata'

arduino = ArduinoFirmata.connect ARGV.shift
puts "firmata version #{arduino.version}"

## regist event
arduino.on :sysex do |command, data|
  puts "command : #{command}"
  puts "data    : #{data.inspect}"
end

## send sysex command
arduino.sysex 0x01, [13, 5, 2]  # pin13, blink 5 times, 200 msec interval
arduino.sysex 0x01, [11, 3, 10]  # pin11, blink 3 times, 1000 msec interval

loop do
  sleep 1
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
arduino_firmata-0.3.7 samples/sysex/sysex_led_blink.rb
arduino_firmata-0.3.6 samples/sysex/sysex_led_blink.rb
arduino_firmata-0.3.5 samples/sysex/sysex_led_blink.rb
arduino_firmata-0.3.4 samples/sysex/sysex_led_blink.rb
arduino_firmata-0.3.3 samples/sysex/sysex_led_blink.rb
arduino_firmata-0.3.2 samples/sysex/sysex_led_blink.rb
arduino_firmata-0.3.1 samples/sysex/sysex_led_blink.rb
arduino_firmata-0.3.0 samples/sysex/sysex_led_blink.rb
arduino_firmata-0.2.9 samples/sysex/sysex_led_blink.rb
arduino_firmata-0.2.8 samples/sysex/sysex_led_blink.rb
arduino_firmata-0.2.7 samples/sysex/sysex_led_blink.rb
arduino_firmata-0.2.6 samples/sysex/sysex_led_blink.rb
arduino_firmata-0.2.5 samples/sysex/sysex_led_blink.rb
arduino_firmata-0.2.4 samples/sysex/sysex_led_blink.rb
arduino_firmata-0.2.3 samples/sysex/sysex_led_blink.rb
arduino_firmata-0.2.2 samples/sysex/sysex_led_blink.rb
arduino_firmata-0.2.1 samples/sysex/sysex_led_blink.rb
arduino_firmata-0.2.0 samples/sysex/sysex_led_blink.rb