Sha256: 33fe2048f17c54930317e38b61419e11e8b95b49738362a08c6d6fed3812b9d0
Contents?: true
Size: 451 Bytes
Versions: 5
Compression:
Stored size: 451 Bytes
Contents
require 'bundler/setup' require 'firmata' require 'socket' sp = TCPSocket.new 'localhost', 8023 board = Firmata::Board.new(sp) board.connect puts "Firmware name #{board.firmware_name}" puts "Firmata version #{board.version}" pin_number = 13 rate = 0.5 10.times do board.digital_write pin_number, Firmata::PinLevels::HIGH puts '+' board.delay rate board.digital_write pin_number, Firmata::PinLevels::LOW puts '-' board.delay rate end
Version data entries
5 entries across 5 versions & 1 rubygems