|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object lejos.nxt.I2CSensor lejos.nxt.addon.MSC
public class MSC
This class has been designed to manage the device
MSC8, Mindsensors NXT Servo which manages up to 8 RC Servos.
For example, do:
msc.servo1.setAngle(angle)
to set the angle of the servo at location 1.
Many thanks to Luis Bunuel (bunuel66@hotmail.com) in Testing process
Field Summary | |
---|---|
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 |
Fields inherited from class lejos.nxt.I2CSensor |
---|
PRODUCT_ID, SENSOR_TYPE, VERSION |
Constructor Summary | |
---|---|
MSC(SensorPort port)
Constructor |
Method Summary | |
---|---|
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 |
Methods inherited from class lejos.nxt.I2CSensor |
---|
fetchString, getData, getPort, getProductID, getSensorType, getVersion, sendData, sendData, setAddress |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
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
Constructor Detail |
---|
public MSC(SensorPort port)
port
- the NXTServo is connected toMethod Detail |
---|
public MServo getServo(int location)
location
- location of the servo (from 1 to 8)
public int getBattery()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |