Sha256: b9951b8ee3f590e45394e40a0c9a6d01f0d096473e7e37573421914044baee01

Contents?: true

Size: 255 Bytes

Versions: 12

Compression:

Stored size: 255 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 9, angle
  sleep 1
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
arduino_firmata-0.3.0 samples/servo.rb
arduino_firmata-0.2.9 samples/servo.rb
arduino_firmata-0.2.8 samples/servo.rb
arduino_firmata-0.2.7 samples/servo.rb
arduino_firmata-0.2.6 samples/servo.rb
arduino_firmata-0.2.5 samples/servo.rb
arduino_firmata-0.2.4 samples/servo.rb
arduino_firmata-0.2.3 samples/servo.rb
arduino_firmata-0.2.2 samples/servo.rb
arduino_firmata-0.2.1 samples/servo.rb
arduino_firmata-0.2.0 samples/servo.rb
arduino_firmata-0.1.8 samples/servo.rb