|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnanovm.nibo.drivers.Motor
public class Motor
Provides methods for the motor controll. All speed information has to be given in ticks, a tick is 1/20 of a whole rotation. see Nibo Wiki for details.
Field Summary | |
---|---|
static int |
MAXIMUM_PWM
|
static int |
MAXIMUM_SPEED
|
static int |
MINIMUM_PWM
|
static int |
MINIMUM_SPEED
|
Constructor Summary | |
---|---|
Motor()
|
Method Summary | |
---|---|
static void |
setParameters(int p,
int i,
int d)
Set the parameters for the motor control algorithm. |
static void |
setPWM(int left,
int right)
Bypass the motor controller and set the PWM values directly. |
static void |
setSpeed(int left,
int right)
Set the target speed for the motor controller. |
static void |
stop()
Stop all motor activity immediatly. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int MAXIMUM_PWM
public static final int MINIMUM_PWM
public static final int MAXIMUM_SPEED
public static final int MINIMUM_SPEED
Constructor Detail |
---|
public Motor()
Method Detail |
---|
public static void setParameters(int p, int i, int d)
p
- proportional factori
- integral factord
- differential factorpublic static void setPWM(int left, int right)
left
- pwm value for the left motorright
- pwm value for the right motorpublic static void setSpeed(int left, int right)
left
- target speed for the left motor in ticks per secondright
- target speed for the right motor in ticks per secondpublic static void stop()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |