|
RoboJDETM v2.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ridgesoft.robotics.effectors.DevantechMD03
public class DevantechMD03
Class to interface with a Devantech MD03 motor driver attached to an I2C port.
Field Summary |
---|
Fields inherited from interface com.ridgesoft.robotics.Motor |
---|
MAX_FORWARD, MAX_REVERSE, STOP |
Constructor Summary | |
---|---|
DevantechMD03(I2CMaster i2cMaster,
int deviceAddress)
Constructs a DevantechMD03 object. |
Method Summary | |
---|---|
void |
brake()
Active braking is not supported. |
int |
getSoftwareRevision()
Gets the software revsion of the device's software. |
void |
setAcceleration(int value)
Sets the motor controller's acceleration value (see MD03 documentation). |
void |
setPower(int power)
Sets the motor's power. |
void |
stop()
Turns motor power off and lets them coast. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait |
Constructor Detail |
---|
public DevantechMD03(I2CMaster i2cMaster, int deviceAddress) throws IOException
i2cMaster
- I2C object for the bus the MD03 connects todeviceAddress
- I2C device address of the MD03
IOException
Method Detail |
---|
public void brake()
brake
in interface Motor
public int getSoftwareRevision() throws IOException
IOException
public void setAcceleration(int value) throws IOException
value
- acceleration (0 - 255, default 0)
IOException
public void setPower(int power)
setPower
in interface Motor
power
- The power level to set. Should be between -16 and 16, inclusive.
Positive is forward, negative is reverse and zero is coast.public void stop()
stop
in interface Motor
|
RoboJDETM v2.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |