public class ServoMotor
extends java.lang.Object
| Constructor and Description |
|---|
ServoMotor(int id,
int home,
int inc)
Creates a servo motor instance with given id.
|
public ServoMotor(int id,
int home,
int inc)
id - the id of the motorhome - the PWM duty cycle for the home positioninc - the increment factor (inc_duty/inc_position)public void setPos(int position)
position - the position with respect to home and using the inc_duty/inc_position factor
For most servo motors in range -200 .. 200public void setPosAbs(int position)
position - the position in arbitrary units in
range 0..4095 (determines PWM duty cycle)
For most servo motors in range 100..500