Sha256: 0b55f790b649603452af38c9ce12e5b6ff658b581db687cfac51f1ad5a1b0bc9

Contents?: true

Size: 266 Bytes

Versions: 23

Compression:

Stored size: 266 Bytes

Contents

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

arduino = ArduinoFirmata.connect ARGV.shift

loop do
  an = arduino.analog_read 0
  puts an
  arduino.analog_write 11, an/4
  sleep 0.1
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
arduino_firmata-0.3.0 samples/analog_read_write.rb
arduino_firmata-0.2.9 samples/analog_read_write.rb
arduino_firmata-0.2.8 samples/analog_read_write.rb
arduino_firmata-0.2.7 samples/analog_read_write.rb
arduino_firmata-0.2.6 samples/analog_read_write.rb
arduino_firmata-0.2.5 samples/analog_read_write.rb
arduino_firmata-0.2.4 samples/analog_read_write.rb
arduino_firmata-0.2.3 samples/analog_read_write.rb
arduino_firmata-0.2.2 samples/analog_read_write.rb
arduino_firmata-0.2.1 samples/analog_read_write.rb
arduino_firmata-0.2.0 samples/analog_read_write.rb
arduino_firmata-0.1.8 samples/analog_read_write.rb
arduino_firmata-0.1.7 samples/analog_read_write.rb
arduino_firmata-0.1.6 samples/analog_read_write.rb
arduino_firmata-0.1.5 samples/analog_read_write.rb
arduino_firmata-0.1.4 samples/analog_read_write.rb
arduino_firmata-0.1.3 samples/analog_read_write.rb
arduino_firmata-0.1.2 samples/analog_read_write.rb
arduino_firmata-0.1.1 samples/analog_read_write.rb
arduino_firmata-0.1.0 samples/analog_read_write.rb