maslab.orc
Class Servo

java.lang.Object
  extended by maslab.orc.Servo

public class Servo
extends java.lang.Object

Orc wrapper for a servo.


Field Summary
 double maxangle
           
 int maxpwm
           
 double minangle
           
 int minpwm
           
 
Constructor Summary
Servo(Orc orc, int port)
           
 
Method Summary
 double current()
          Measure the servo's current consumption.
static void main(java.lang.String[] args)
          A very simple little servo calibration program.
static Servo makeHitecHS300(Orc orc, int port)
          Create a servo using default parameters of an Hitec HS300 seeking from 0 to 180 degrees.
static Servo makeMpiMX400(Orc orc, int port)
          Create a servo using default parameters of an MPI-MX400, seeking from 0 to 180 degrees.
 void seek(double angle)
          Seek the servo.
 double tell()
          Determine the servo's current command.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

minpwm

public int minpwm

maxpwm

public int maxpwm

minangle

public double minangle

maxangle

public double maxangle
Constructor Detail

Servo

public Servo(Orc orc,
             int port)
Method Detail

makeMpiMX400

public static Servo makeMpiMX400(Orc orc,
                                 int port)
Create a servo using default parameters of an MPI-MX400, seeking from 0 to 180 degrees.


makeHitecHS300

public static Servo makeHitecHS300(Orc orc,
                                   int port)
Create a servo using default parameters of an Hitec HS300 seeking from 0 to 180 degrees.


seek

public void seek(double angle)
Seek the servo.

Parameters:
angle - The angle to seek to.

tell

public double tell()
Determine the servo's current command.

Returns:
The angle the servo is attempting to seek to.

current

public double current()
Measure the servo's current consumption.


main

public static void main(java.lang.String[] args)
A very simple little servo calibration program.