Sha256: 68ab18b11250f3d2be15ade2663ce6eb928cec734eca55787bfba3e1cc5b4fbc
Contents?: true
Size: 404 Bytes
Versions: 23
Compression:
Stored size: 404 Bytes
Contents
#usr/bin/env ruby $:.unshift File.expand_path '../lib', File.dirname(__FILE__) require 'rubygems' require 'arduino_firmata' arduino = ArduinoFirmata.connect ARGV.shift pin_num = 11 loop do puts "-"*10 0.upto(255) do |i| puts i arduino.analog_write pin_num, i sleep 0.01 end puts "-"*10 255.downto(0) do |i| puts i arduino.analog_write pin_num, i sleep 0.01 end end
Version data entries
23 entries across 23 versions & 1 rubygems