Class: RoboticArm::Gripper

Inherits:
ComponentMoving show all
Defined in:
lib/robotic-arm.rb

Instance Method Summary collapse

Methods inherited from ComponentMoving

#initialize, #moving?, #stop

Methods inherited from Component

#active?, #initialize

Constructor Details

This class inherits a constructor from RoboticArm::ComponentMoving

Instance Method Details

#close(seconds = 0) ⇒ Object



320
321
322
323
324
# File 'lib/robotic-arm.rb', line 320

def close(seconds=0)
  return if @active and @moving == :close
  activate(@switch, @val=0x01, seconds)
  @moving = :close
end

#open(seconds = 0) ⇒ Object



314
315
316
317
318
# File 'lib/robotic-arm.rb', line 314

def open (seconds=0)
  return if @active and @moving == :open
  activate(@switch, @val=0x02, seconds)
  @moving = :open
end