Method: WallE::Servo#move_to
- Defined in:
- lib/wall_e/components/servo.rb
#move_to(degrees) ⇒ Object
Public: Move the servo.
degrees - the Integer degrees to move to.
Returns nothing. Raises OutOfBoundsError if the servo cannot move to the degree.
43 44 45 46 |
# File 'lib/wall_e/components/servo.rb', line 43 def move_to(degrees) raise OutOfBoundsError unless @range.include?(degrees) @pin.servo_write(degrees) end |