Sha256: 4a86ea1d112d41429acdb1d0a97c42398eab83137a65e657cd540ed464062846

Contents?: true

Size: 269 Bytes

Versions: 3

Compression:

Stored size: 269 Bytes

Contents

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

arduino = ArduinoFirmata::Arduino.new ARGV.shift

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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
arduino_firmata-0.0.3 samples/analog_read_write.rb
arduino_firmata-0.0.2 samples/analog_read_write.rb
arduino_firmata-0.0.1 samples/analog_read_write.rb