public interface AMSColorSensor extends ColorSensor, NormalizedColorSensor
AMSColorSensor
is an extension of ColorSensor that provides additional functionality
supported by a family of color sensor chips from AMS.Modifier and Type | Interface and Description |
---|---|
static class |
AMSColorSensor.Config |
static class |
AMSColorSensor.Enable |
static class |
AMSColorSensor.Gain |
static class |
AMSColorSensor.LEDDrive |
static class |
AMSColorSensor.Parameters
Instances of Parameters contain data indicating how the
sensor is to be initialized.
|
static class |
AMSColorSensor.Pers |
static class |
AMSColorSensor.Register
AMSColorSensor.Register provides symbolic names for interesting device registers |
static class |
AMSColorSensor.Status |
static class |
AMSColorSensor.Wait
Wait time is set 2.4 ms increments unless the WLONG bit is
asserted, in which case the wait times are 12× longer.
|
HardwareDevice.Manufacturer
Modifier and Type | Field and Description |
---|---|
static int |
AMS_COLOR_COMMAND_BIT |
static int |
AMS_COLOR_COMMAND_TYPE_AUTO_INCREMENT |
static int |
AMS_COLOR_COMMAND_TYPE_REPEATED_BYTE |
static int |
AMS_COLOR_COMMAND_TYPE_RESERVED |
static int |
AMS_COLOR_COMMAND_TYPE_SPECIAL |
static I2cAddr |
AMS_TCS34725_ADDRESS |
static byte |
AMS_TCS34725_ID |
static I2cAddr |
AMS_TMD37821_ADDRESS |
static byte |
AMS_TMD37821_ID |
static byte |
AMS_TMD37823_ID |
Modifier and Type | Method and Description |
---|---|
byte |
getDeviceID()
Returns the flavor of the AMS color sensor as reported by the chip itself
|
AMSColorSensor.Parameters |
getParameters()
Returns the parameters which which initialization was last attempted, if any
|
boolean |
initialize(AMSColorSensor.Parameters parameters)
Initialize the sensor using the indicated set of parameters.
|
byte[] |
read(AMSColorSensor.Register register,
int cb)
Low level: read data starting at the indicated register
|
byte |
read8(AMSColorSensor.Register register)
Low level: read the byte starting at the indicated register
|
void |
write(AMSColorSensor.Register register,
byte[] data)
Low level: write data starting at the indicated register
|
void |
write8(AMSColorSensor.Register register,
int bVal)
Low level: write a byte to the indicated register
|
alpha, argb, blue, enableLed, getI2cAddress, green, red, setI2cAddress
getNormalizedColors
close, getConnectionInfo, getDeviceName, getManufacturer, getVersion, resetDeviceConfigurationForOpMode
static final I2cAddr AMS_TCS34725_ADDRESS
static final I2cAddr AMS_TMD37821_ADDRESS
static final byte AMS_TCS34725_ID
static final byte AMS_TMD37821_ID
static final byte AMS_TMD37823_ID
static final int AMS_COLOR_COMMAND_BIT
static final int AMS_COLOR_COMMAND_TYPE_REPEATED_BYTE
static final int AMS_COLOR_COMMAND_TYPE_AUTO_INCREMENT
static final int AMS_COLOR_COMMAND_TYPE_RESERVED
static final int AMS_COLOR_COMMAND_TYPE_SPECIAL
boolean initialize(AMSColorSensor.Parameters parameters)
parameters
- the parameters with which to initialize the deviceAMSColorSensor.Parameters getParameters()
byte getDeviceID()
byte read8(AMSColorSensor.Register register)
register
- the location from which to read the databyte[] read(AMSColorSensor.Register register, int cb)
register
- the location from which to read the datacb
- the number of bytes to readvoid write8(AMSColorSensor.Register register, int bVal)
register
- the location at which to write the databVal
- the data to writevoid write(AMSColorSensor.Register register, byte[] data)