Sha256: a22204301813a86b37aa892859ac4ca12639824bd751085cccaca774990bc45b

Contents?: true

Size: 257 Bytes

Versions: 7

Compression:

Stored size: 257 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

7 entries across 7 versions & 1 rubygems

Version Path
arduino_firmata-0.3.7 samples/servo.rb
arduino_firmata-0.3.6 samples/servo.rb
arduino_firmata-0.3.5 samples/servo.rb
arduino_firmata-0.3.4 samples/servo.rb
arduino_firmata-0.3.3 samples/servo.rb
arduino_firmata-0.3.2 samples/servo.rb
arduino_firmata-0.3.1 samples/servo.rb