Sha256: 3792734d4af56a1652609405c076395a8af6a71c81980dc28355d183fd65ab28

Contents?: true

Size: 256 Bytes

Versions: 7

Compression:

Stored size: 256 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
  angle = rand 180
  puts angle
  arduino.servo_write 11, angle
  sleep 1
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
arduino_firmata-0.1.7 samples/servo.rb
arduino_firmata-0.1.6 samples/servo.rb
arduino_firmata-0.1.5 samples/servo.rb
arduino_firmata-0.1.4 samples/servo.rb
arduino_firmata-0.1.3 samples/servo.rb
arduino_firmata-0.1.2 samples/servo.rb
arduino_firmata-0.1.1 samples/servo.rb