@I2cDeviceType @DeviceProperties(name="@string/rev_color_sensor_v3_name", description="@string/rev_color_sensor_v3_description", xmlTag="RevColorSensorV3", compatibleControlSystems=REV_HUB, builtIn=true) public class RevColorSensorV3 extends BroadcomColorSensorImpl implements DistanceSensor, OpticalDistanceSensor, ColorRangeSensor
RevColorSensorV3 implements support for the REV Robotics Color Sensor V3.HardwareDevice.ManufacturerBroadcomColorSensor.Gain, BroadcomColorSensor.LEDCurrent, BroadcomColorSensor.LEDPulseModulation, BroadcomColorSensor.MainControl, BroadcomColorSensor.MainStatus, BroadcomColorSensor.Parameters, BroadcomColorSensor.PSMeasurementRate, BroadcomColorSensor.PSResolution, BroadcomColorSensor.Register| Modifier and Type | Field and Description |
|---|---|
protected static double |
apiLevelMax |
protected static double |
apiLevelMin |
TAGparametersdeviceClient, deviceClientIsOwned, isInitializeddistanceOutOfRangeBROADCOM_APDS9151_ADDRESS, BROADCOM_APDS9151_ID| Constructor and Description |
|---|
RevColorSensorV3(I2cDeviceSynchSimple deviceClient) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getDeviceName()
Returns a string suitable for display to the user as to the type of device.
|
double |
getDistance(DistanceUnit unit)
Returns a calibrated, linear sense of distance as read by the infrared proximity
part of the sensor.
|
double |
getLightDetected()
Get the amount of light detected by the sensor, scaled and cliped to a range
which is a pragmatically useful sensitivity.
|
HardwareDevice.Manufacturer |
getManufacturer()
Returns an indication of the manufacturer of this device.
|
double |
getRawLightDetected()
Returns a signal whose strength is proportional to the intensity of the light measured.
|
double |
getRawLightDetectedMax()
Returns the maximum value that can be returned by
LightSensor.getRawLightDetected(). |
protected double |
inFromOptical(int rawOptical)
Converts a raw optical inverse-square reading into a fitted, calibrated linear reading in
INCHES.
|
int |
rawOptical() |
java.lang.String |
status()
Status of this sensor, in string form
|
alpha, argb, blue, delay, disable, dumpState, enable, enableLed, getDeviceID, getI2cAddress, getNormalizedColors, green, internalInitialize, isLightOn, read, read8, readMainCtrl, readUnsignedByte, readUnsignedShort, red, setGain, setI2cAddress, setLEDParameters, setPDrive, setProximityPulseCount, setPSRateAndRes, testBits, testBits, write, write8doInitialize, getParameters, initializeclose, disengage, engage, getConnectionInfo, getDeviceClient, getVersion, initialize, initializeIfNecessary, onModuleStateChange, registerArmingStateCallback, resetDeviceConfigurationForOpModeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitalpha, argb, blue, enableLed, getI2cAddress, green, red, setI2cAddressgetNormalizedColorsenableLedclose, getConnectionInfo, getVersion, resetDeviceConfigurationForOpModegetParameters, initializeprotected static final double apiLevelMin
protected static final double apiLevelMax
public RevColorSensorV3(I2cDeviceSynchSimple deviceClient)
public java.lang.String getDeviceName()
HardwareDevicegetDeviceName in interface HardwareDevicegetDeviceName in class BroadcomColorSensorImplpublic HardwareDevice.Manufacturer getManufacturer()
HardwareDevicegetManufacturer in interface HardwareDevicegetManufacturer in class BroadcomColorSensorImplpublic double getLightDetected()
LightSensorgetLightDetected in interface LightSensorpublic double getRawLightDetected()
LightSensorgetRawLightDetected in interface LightSensorpublic double getRawLightDetectedMax()
LightSensorLightSensor.getRawLightDetected().getRawLightDetectedMax in interface LightSensorLightSensor.getRawLightDetected()public java.lang.String status()
LightSensorstatus in interface LightSensorpublic double getDistance(DistanceUnit unit)
getDistance in interface DistanceSensorunit - the unit of distance in which the result should be returnedprotected double inFromOptical(int rawOptical)
public int rawOptical()