public interface BroadcomColorSensor extends ColorSensor, NormalizedColorSensor
BroadcomColorSensor
is an extension of ColorSensor that provides additional functionality
supported by a family of color sensor chips from Broadcom.Modifier and Type | Interface and Description |
---|---|
static class |
BroadcomColorSensor.Gain |
static class |
BroadcomColorSensor.LEDCurrent |
static class |
BroadcomColorSensor.LEDPulseModulation |
static class |
BroadcomColorSensor.MainControl |
static class |
BroadcomColorSensor.MainStatus |
static class |
BroadcomColorSensor.Parameters
Instances of Parameters contain data indicating how the
sensor is to be initialized.
|
static class |
BroadcomColorSensor.PSMeasurementRate |
static class |
BroadcomColorSensor.PSResolution |
static class |
BroadcomColorSensor.Register
BroadcomColorSensor.Register provides symbolic names for interesting device registers |
HardwareDevice.Manufacturer
Modifier and Type | Field and Description |
---|---|
static I2cAddr |
BROADCOM_APDS9151_ADDRESS |
static byte |
BROADCOM_APDS9151_ID |
Modifier and Type | Method and Description |
---|---|
byte |
getDeviceID()
Returns the flavor of the Broadcom color sensor as reported by the chip itself
|
BroadcomColorSensor.Parameters |
getParameters()
Returns the parameters which which initialization was last attempted, if any
|
boolean |
initialize(BroadcomColorSensor.Parameters parameters)
Initialize the sensor using the indicated set of parameters.
|
byte[] |
read(BroadcomColorSensor.Register register,
int cb)
Low level: read data starting at the indicated register
|
byte |
read8(BroadcomColorSensor.Register register)
Low level: read the byte starting at the indicated register
|
void |
write(BroadcomColorSensor.Register register,
byte[] data)
Low level: write data starting at the indicated register
|
void |
write8(BroadcomColorSensor.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 BROADCOM_APDS9151_ADDRESS
static final byte BROADCOM_APDS9151_ID
boolean initialize(BroadcomColorSensor.Parameters parameters)
parameters
- the parameters with which to initialize the deviceBroadcomColorSensor.Parameters getParameters()
byte getDeviceID()
byte read8(BroadcomColorSensor.Register register)
register
- the location from which to read the databyte[] read(BroadcomColorSensor.Register register, int cb)
register
- the location from which to read the datacb
- the number of bytes to readvoid write8(BroadcomColorSensor.Register register, int bVal)
register
- the location at which to write the databVal
- the data to writevoid write(BroadcomColorSensor.Register register, byte[] data)