RoboJDETM v2.0

com.ridgesoft.robotics.effectors
Class DevantechMD22

java.lang.Object
  extended by com.ridgesoft.robotics.effectors.DevantechMD22

public class DevantechMD22
extends Object

Class to interface with a Devantech MD22 dual motor driver attached to an I2C port.


Constructor Summary
DevantechMD22(I2CMaster i2cMaster, int deviceAddress)
          Constructs a DevantechMD22 object.
 
Method Summary
 Motor getMotor1()
          Gets the Motor object for motor 1.
 Motor getMotor2()
          Gets the Motor object for motor 2.
 int getSoftwareRevision()
          Gets the software revsion of the device's software.
 void setAcceleration(int value)
          Sets the motor controller's acceleration value (see MD22 documentation).
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait
 

Constructor Detail

DevantechMD22

public DevantechMD22(I2CMaster i2cMaster,
                     int deviceAddress)
              throws IOException
Constructs a DevantechMD22 object.

Parameters:
i2cMaster - I2C object for the bus the compass connects to
deviceAddress - I2C device address of the MD22
Throws:
IOException
Method Detail

getMotor1

public Motor getMotor1()
Gets the Motor object for motor 1.

Returns:
Motor object for motor 1.

getMotor2

public Motor getMotor2()
Gets the Motor object for motor 2.

Returns:
Motor object for motor 2.

getSoftwareRevision

public int getSoftwareRevision()
                        throws IOException
Gets the software revsion of the device's software.

Returns:
software revision number
Throws:
IOException

setAcceleration

public void setAcceleration(int value)
                     throws IOException
Sets the motor controller's acceleration value (see MD22 documentation).

Parameters:
value - acceleration (0 - 255, default 0)
Throws:
IOException

RoboJDETM v2.0

Copyright (c) 2003-2009 RidgeSoft, LLC. All rights reserved.
www.ridgesoft.com