Sha256: 6095f4c396937a5c1b39e9722237a72880e26fcd8fd044e14b19677114a99115

Contents?: true

Size: 606 Bytes

Versions: 9

Compression:

Stored size: 606 Bytes

Contents

## use samples/sysex/SysexLedBlinkFirmata/SysexLedBlinkFirmata.ino

require File.expand_path 'test_helper', File.dirname(__FILE__)

class TestSysex < MiniTest::Test

  def setup
    @arduino = ArduinoFirmata.connect ENV['ARDUINO']
  end

  def teardown
    @arduino.close
  end

  def test_sysex_command
    __cmd = nil
    __data = nil
    @arduino.on :sysex do |cmd, data|
      __cmd = cmd
      __data = data
    end

    @arduino.sysex 0x01, [13, 3, 2]

    100.times do
      sleep 0.1
      break if __cmd != nil
    end

    assert __cmd == 0x01
    assert __data == [13, 0, 3, 0, 2, 0]
  end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
arduino_firmata-0.3.7 test/test_sysex.rb
arduino_firmata-0.3.6 test/test_sysex.rb
arduino_firmata-0.3.5 test/test_sysex.rb
arduino_firmata-0.3.4 test/test_sysex.rb
arduino_firmata-0.3.3 test/test_sysex.rb
arduino_firmata-0.3.2 test/test_sysex.rb
arduino_firmata-0.3.1 test/test_sysex.rb
arduino_firmata-0.3.0 test/test_sysex.rb
arduino_firmata-0.2.9 test/test_sysex.rb