public class LDCMotor extends LMotor
arrMotorLoad, arrMotorUnload, LSC_position, SPI_PORT
address, DEFAULT_I2C_ADDRESS, port, REG_PRODUCT_ID, REG_VENDOR_ID, REG_VERSION, retryCount
currentMode, modes
BLACK, BLANK_INDEX, BLUE, BLUE_INDEX, BROWN, GREEN, GREEN_INDEX, MAX_TYPE, MIN_TYPE, MODE_RAW, NXT_ADC_RES, RED, RED_INDEX, TYPE_ANGLE, TYPE_COLORBLUE, TYPE_COLORFULL, TYPE_COLORGREEN, TYPE_COLORNONE, TYPE_COLORRED, TYPE_CUSTOM, TYPE_HIGHSPEED, TYPE_HIGHSPEED_9V, TYPE_HISPEED, TYPE_LIGHT_ACTIVE, TYPE_LIGHT_INACTIVE, TYPE_LOWSPEED, TYPE_LOWSPEED_9V, TYPE_NO_SENSOR, TYPE_REFLECTION, TYPE_SOUND_DB, TYPE_SOUND_DBA, TYPE_SWITCH, TYPE_TEMPERATURE, WHITE, YELLOW
Constructor and Description |
---|
LDCMotor(I2CPort port,
int location,
java.lang.String DCMotorName,
byte SPI_PORT)
Constructor
|
LDCMotor(I2CPort port,
int location,
java.lang.String DCMotorName,
byte SPI_PORT,
int forwardMinSpeed,
int forwardMaxSpeed,
int backwardMinSpeed,
int backwardMaxSpeed) |
Modifier and Type | Method and Description |
---|---|
int |
getSpeed()
Method to get speed from the DC Motor
|
void |
setBackwardMaxSpeed(int max_speed) |
void |
setBackwardMinSpeed(int min_speed) |
void |
setForwardMaxSpeed(int max_speed) |
void |
setForwardMinSpeed(int min_speed) |
void |
setSpeed(int speed)
Method to set the speed in a DC Motor
|
getName, getPulse, isMoving, load, setDelay, setPulse, unload
fetchString, getAddress, getData, getData, getPort, getProductID, getRetryCount, getVendorID, getVersion, sendData, sendData, sendData, setAddress, setRetryCount
fetchSample, getAvailableModes, getCurrentMode, getMode, getMode, getModeCount, sampleSize, setCurrentMode, setCurrentMode, setModes
close, releaseOnClose
public LDCMotor(I2CPort port, int location, java.lang.String DCMotorName, byte SPI_PORT)
port
- location
- DCMotorName
- SPI_PORT
- public LDCMotor(I2CPort port, int location, java.lang.String DCMotorName, byte SPI_PORT, int forwardMinSpeed, int forwardMaxSpeed, int backwardMinSpeed, int backwardMaxSpeed)
public void setSpeed(int speed)
speed
- the speedpublic int getSpeed()
public void setForwardMinSpeed(int min_speed)
public void setForwardMaxSpeed(int max_speed)
public void setBackwardMinSpeed(int min_speed)
public void setBackwardMaxSpeed(int max_speed)