Sha256: ba93feb1053faf808bda83f48b0de0cecceff1e161a634a3dd584f2012a0fb00

Contents?: true

Size: 466 Bytes

Versions: 11

Compression:

Stored size: 466 Bytes

Contents

#usr/bin/env ruby
$:.unshift File.expand_path '../lib', File.dirname(__FILE__)
require 'rubygems'
require 'arduino_firmata'

ArduinoFirmata.connect ARGV[0] do
  puts "firmata version #{version}"
  led_stat = false

  5.times do
    digital_write(13, led_stat = !led_stat)
    puts "led : #{led_stat}"
    puts "analog : #{analog_read 0}"

    [(0..255).to_a, (0..255).to_a.reverse].flatten.each do |i|
      analog_write(11, i)
      sleep 0.01
    end
  end
  
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
arduino_firmata-0.1.6 samples/block.rb
arduino_firmata-0.1.5 samples/block.rb
arduino_firmata-0.1.4 samples/block.rb
arduino_firmata-0.1.3 samples/block.rb
arduino_firmata-0.1.2 samples/block.rb
arduino_firmata-0.1.1 samples/block.rb
arduino_firmata-0.1.0 samples/block.rb
arduino_firmata-0.0.9 samples/block.rb
arduino_firmata-0.0.8 samples/block.rb
arduino_firmata-0.0.7 samples/block.rb
arduino_firmata-0.0.6 samples/block.rb