Sha256: cd1ef03d7921019a3c9ff1006eaf3d3c8df0bbff7646abc18720b7f3ff04c1c6
Contents?: true
Size: 478 Bytes
Versions: 4
Compression:
Stored size: 478 Bytes
Contents
require 'bundler/setup' require 'firmata' require 'socket' sp = TCPSocket.open 'localhost', 4567 #sp = '/dev/tty.usbserial-A700636n' board = Firmata::Board.new(sp) board.connect puts "Firmware name #{board.firmware_name}" puts "Firmata version #{board.version}" pin_number = 3 rate = 0.5 10.times do board.digital_write pin_number, Firmata::Board::HIGH puts '+' board.delay rate board.digital_write pin_number, Firmata::Board::LOW puts '-' board.delay rate end
Version data entries
4 entries across 4 versions & 1 rubygems