public class MSC extends I2CSensor
msc.servo1.setAngle(angle)
to set the angle of the servo at location 1.
Many thanks to Luis Bunuel (bunuel66@hotmail.com) in Testing processModifier and Type | Field and Description |
---|---|
static byte |
MSC8_VBATT |
static byte |
NXTSERVO_ADDRESS |
MServo |
servo1
Servo at location 1
|
MServo |
servo2
Servo at location 2
|
MServo |
servo3
Servo at location 3
|
MServo |
servo4
Servo at location 4
|
MServo |
servo5
Servo at location 5
|
MServo |
servo6
Servo at location 6
|
MServo |
servo7
Servo at location 7
|
MServo |
servo8
Servo at location 8
|
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 |
---|
MSC(I2CPort port) |
MSC(Port port)
Constructor
|
Modifier and Type | Method and Description |
---|---|
int |
getBattery()
Read the battery voltage data from
NXTServo module (in millivolts)
|
MServo |
getServo(int location)
Method to get an RC Servo in from the NXTServo
|
fetchString, getAddress, getData, getData, getPort, getProductID, getRetryCount, getVendorID, getVersion, sendData, sendData, sendData, setAddress, setRetryCount
fetchSample, getAvailableModes, getCurrentMode, getMode, getMode, getModeCount, getName, sampleSize, setCurrentMode, setCurrentMode, setModes
close, releaseOnClose
public static final byte NXTSERVO_ADDRESS
public static final byte MSC8_VBATT
public MServo servo1
public MServo servo2
public MServo servo3
public MServo servo4
public MServo servo5
public MServo servo6
public MServo servo7
public MServo servo8
public MSC(Port port)
port
- the NXTServo is connected topublic MSC(I2CPort port)
public MServo getServo(int location)
location
- location of the servo (from 1 to 8)public int getBattery()