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