public class ServoMotorCallibration
extends java.lang.Object
We send PWM signals with pulse length varying from 0.7 to 2.3 ms.
The method will print at the standard output the current pulse length. All you need to do is to observe the pulse length and the position of the rotor, with regard this length.
Constructor and Description |
---|
ServoMotorCallibration(int minValue,
int maxValue)
Constructor for a new callibrator.
|
Modifier and Type | Method and Description |
---|---|
static void |
main(java.lang.String[] args)
Command-line interface.
|
void |
setValue(int value)
Sets the value sent to the PWM pin.
|
void |
stop()
Stop sending orders to the servo motor.
|
public ServoMotorCallibration(int minValue, int maxValue)
minValue
- the minimum pulse length value, in ms.maxValue
- the maximum pulse length value, in ms.public void setValue(int value)
value
- the new value, in the previously set min..max range.public static void main(java.lang.String[] args)
args
- mixValue maxValue increment.public void stop()
It tells the motor to turn itself off and wait for more instructions.