public interface IrSeekerSensor extends HardwareDevice
Determine the location of an IR source
Modifier and Type | Interface and Description |
---|---|
static class |
IrSeekerSensor.IrSeekerIndividualSensor
IR Sensor attached to an IR Seeker
|
static class |
IrSeekerSensor.Mode
Enumeration of device modes
|
HardwareDevice.Manufacturer
Modifier and Type | Method and Description |
---|---|
double |
getAngle()
Estimated angle in which the signal is coming from
|
I2cAddr |
getI2cAddress()
Get the current I2C Address of this object.
|
IrSeekerSensor.IrSeekerIndividualSensor[] |
getIndividualSensors()
Get a list of all IR sensors attached to this seeker.
|
IrSeekerSensor.Mode |
getMode()
Get the device mode
|
double |
getSignalDetectedThreshold()
Get the minimum threshold for a signal to be considered detected
|
double |
getStrength()
IR Signal strength
|
void |
setI2cAddress(I2cAddr newAddress)
Set the I2C address to a new value.
|
void |
setMode(IrSeekerSensor.Mode mode)
Set the device mode
|
void |
setSignalDetectedThreshold(double threshold)
Set the minimum threshold for a signal to be considered detected
|
boolean |
signalDetected()
Returns true if an IR signal is detected
|
close, getConnectionInfo, getDeviceName, getManufacturer, getVersion, resetDeviceConfigurationForOpMode
void setSignalDetectedThreshold(double threshold)
threshold
- minimum thresholddouble getSignalDetectedThreshold()
void setMode(IrSeekerSensor.Mode mode)
mode
- sample rateIrSeekerSensor.Mode getMode()
boolean signalDetected()
double getAngle()
If the signal is estimated to be directly ahead, 0 will be returned. If the signal is to the left a negative angle will be returned. If the signal is to the right a positive angle will be returned. If no signal is detected, a 0 will be returned.
NOTE: not all sensors give an accurate angle.
double getStrength()
Detected IR signal strength, on a scale of 0.0 to 1.0, where 0 is no signal detected and 1 is max IR signal detected.
IrSeekerSensor.IrSeekerIndividualSensor[] getIndividualSensors()
void setI2cAddress(I2cAddr newAddress)
I2cAddr getI2cAddress()