|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecticommand.platform.nxt.I2CSensor
public class I2CSensor
A sensor wrapper to allow easy access to I2C sensors, like the ultrasonic sensor. Currently uses the default I2C address of 0x02, but some sensors can be connected to same port lines and use different addresses using the Auto Detecting Parallel Architecture (ADPA). Currently unsure if there are commercial port expanders yet to use this function, or whether the Lego Ultrasonic sensor is ADPA compatible.
Constructor Summary | |
---|---|
I2CSensor(Sensor s,
byte sensorType)
|
Method Summary | |
---|---|
int |
getId()
|
java.lang.String |
getProductID()
Returns the Product ID as a string. |
java.lang.String |
getSensorType()
Returns the type of sensor as a string. |
java.lang.String |
getVersion()
Returns the version number of the sensor hardware. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public I2CSensor(Sensor s, byte sensorType)
s
- A sensor. e.g. Sensor.S1Method Detail |
---|
public int getId()
public java.lang.String getVersion()
public java.lang.String getProductID()
public java.lang.String getSensorType()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |