class Artoo::Drivers::ContinuousServo
ContinuousServo
behaviors for Firmata
Constants
- COMMANDS
Public Class Methods
new(params={})
click to toggle source
Create new ContinuousServo
Calls superclass method
# File lib/artoo/drivers/continuous_servo.rb, line 10 def initialize(params={}) super end
Public Instance Methods
clockwise()
click to toggle source
Turns the servo clockwise
# File lib/artoo/drivers/continuous_servo.rb, line 20 def clockwise connection.servo_write(pin, 180) end
counter_clockwise()
click to toggle source
Turns the servo counter clockwise
# File lib/artoo/drivers/continuous_servo.rb, line 25 def counter_clockwise connection.servo_write(pin, 89) end
stop()
click to toggle source
Stops the driver
# File lib/artoo/drivers/continuous_servo.rb, line 15 def stop connection.servo_write(pin, 90) end