Package lejos.hardware.sensor
Class HiTechnicIRSeekerV2
- java.lang.Object
-
- lejos.hardware.Device
-
- lejos.hardware.sensor.BaseSensor
-
- lejos.hardware.sensor.I2CSensor
-
- lejos.hardware.sensor.HiTechnicIRSeekerV2
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,SensorConstants,SensorMode,SensorModes,SampleProvider
public class HiTechnicIRSeekerV2 extends I2CSensor
HiTechnic NXT IRSeeker V2
The NXT IRSeeker V2 (Version 2) is a multi-element infrared detector that detects infrared signals from sources such as the HiTechnic IRBall soccer ball, infrared remote controls and sunlight.The code for this sensor has not been tested. Please report test results to the leJOS forum.
Supported modes Mode name Description unit(s) Getter modulated Measures the angle to a source of modulated (1200 Hz square wave) infrared light Degrees getModulatedMode()Unmodulated Measures the angle to a source of unmodulated infrared light Degrees getUnmodulatedMode()See Sensor Product page See The leJOS sensor framework See
leJOS conventions for SampleProviders- Author:
- Lawrie Griffiths
-
-
Field Summary
-
Fields inherited from class lejos.hardware.sensor.I2CSensor
DEFAULT_I2C_ADDRESS, port, REG_PRODUCT_ID, REG_VENDOR_ID, REG_VERSION, retryCount
-
Fields inherited from class lejos.hardware.sensor.BaseSensor
currentMode, modes
-
Fields inherited from interface lejos.hardware.sensor.SensorConstants
BLACK, BLANK_INDEX, BLUE, BLUE_INDEX, BROWN, GREEN, GREEN_INDEX, MAX_TYPE, MIN_TYPE, MODE_RAW, NXT_ADC_RES, RED, RED_INDEX, TYPE_ANGLE, TYPE_COLORBLUE, TYPE_COLORFULL, TYPE_COLORGREEN, TYPE_COLORNONE, TYPE_COLORRED, TYPE_CUSTOM, TYPE_HIGHSPEED, TYPE_HIGHSPEED_9V, TYPE_HISPEED, TYPE_LIGHT_ACTIVE, TYPE_LIGHT_INACTIVE, TYPE_LOWSPEED, TYPE_LOWSPEED_9V, TYPE_NO_SENSOR, TYPE_REFLECTION, TYPE_SOUND_DB, TYPE_SOUND_DBA, TYPE_SWITCH, TYPE_TEMPERATURE, WHITE, YELLOW
-
-
Constructor Summary
Constructors Constructor Description HiTechnicIRSeekerV2(I2CPort port)HiTechnicIRSeekerV2(Port port)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SensorModegetModulatedMode()HiTechnic IR seeker V2, modulated mode
Measures the angle to a source of a modulated infrared light.SensorModegetUnmodulatedMode()HiTechnic IR seeker V2, Unmodulated mode
Measures the angle to a source of unmodulated infrared lightprotected voidinit()-
Methods inherited from class lejos.hardware.sensor.I2CSensor
fetchString, getAddress, getData, getData, getPort, getProductID, getRetryCount, getVendorID, getVersion, sendData, sendData, sendData, setAddress, setRetryCount
-
Methods inherited from class lejos.hardware.sensor.BaseSensor
fetchSample, getAvailableModes, getCurrentMode, getMode, getMode, getModeCount, getName, sampleSize, setCurrentMode, setCurrentMode, setModes
-
Methods inherited from class lejos.hardware.Device
close, releaseOnClose
-
-
-
-
Method Detail
-
init
protected void init()
-
getModulatedMode
public SensorMode getModulatedMode()
HiTechnic IR seeker V2, modulated mode
Measures the angle to a source of a modulated infrared light.Size and content of the sample
The sample contains one element containing the angle to the infrared source. The angle is expressed in degrees following the right hand rule.
-
getUnmodulatedMode
public SensorMode getUnmodulatedMode()
HiTechnic IR seeker V2, Unmodulated mode
Measures the angle to a source of unmodulated infrared lightSize and content of the sample
The sample contains one element containing the angle to the infrared source. The angle is expressed in degrees following the right hand rule.
-
-