Class DexterThermalIRSensor
- java.lang.Object
-
- lejos.hardware.Device
-
- lejos.hardware.sensor.BaseSensor
-
- lejos.hardware.sensor.I2CSensor
-
- lejos.hardware.sensor.DexterThermalIRSensor
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,SensorConstants,SensorMode,SensorModes,SampleProvider
public class DexterThermalIRSensor extends I2CSensor
Dexter Industries Thermal Infrared Sensor
The Dexter Industries Thermal Infrared Sensor reads surface temperatures of objects.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 Object Measures the temperature of an objects surface Kelvin getObjectMode()Ambient Measures the ambient temperature Kelvin getAmbientMode()Sensor configuration
The Emissivity value of the sensor can be configured using thesetEmissivity(float)method.See Sensor datasheet See Sensor Product page See The leJOS sensor framework See
leJOS conventions for SampleProviders- Author:
- Kirk P. Thompson
-
-
Field Summary
-
Fields inherited from class lejos.hardware.sensor.I2CSensor
address, 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 DexterThermalIRSensor(I2CPort port)Construct a sensor instance that is connected toport.DexterThermalIRSensor(Port port)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SensorModegetAmbientMode()Dexter Industries Thermal Infrared Sensor, Ambient mode
Measures the ambient temperaturefloatgetEmissivity()Read the current emissivity value.SensorModegetObjectMode()Dexter Industries Thermal Infrared Sensor, Object mode
Measures the temperature of an objects surfacejava.lang.StringgetProductID()Read the sensor's product identifier.java.lang.StringgetVendorID()Read the sensor's vendor identifier.protected voidinit()voidsetEmissivity(float emissivity)Set the sensor's emissivity value.-
Methods inherited from class lejos.hardware.sensor.I2CSensor
fetchString, getAddress, getData, getData, getPort, getRetryCount, 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()
-
setEmissivity
public void setEmissivity(float emissivity)
Set the sensor's emissivity value. Valid values are 0.01-1.0. The emissivity is stored in non-volatile memory of the sensor and will be retained even after power-off.< 0.01 returns with no action. > 1.0 sets to 1.0
- Parameters:
emissivity- The value to set emissivity coefficient to
-
getEmissivity
public float getEmissivity()
Read the current emissivity value.Caveat Emptor: The sensor appears to only return the emissivity value after it was intially set after power-up with
setEmissivity(). It doesn't seem to retrieve it from EEPROM.- Returns:
- The emissivity value from 0.01 to 1.0
-
getProductID
public java.lang.String getProductID()
Description copied from class:I2CSensorRead the sensor's product identifier. This method reads up to 8 bytes and returns the characters before the zero termination byte. Examples: "Sonar", ...- Overrides:
getProductIDin classI2CSensor- Returns:
- product identifier
-
getVendorID
public java.lang.String getVendorID()
Description copied from class:I2CSensorRead the sensor's vendor identifier. This method reads up to 8 bytes and returns the characters before the zero termination byte. Examples: "LEGO", "HiTechnc", ...- Overrides:
getVendorIDin classI2CSensor- Returns:
- vendor identifier
-
getObjectMode
public SensorMode getObjectMode()
Dexter Industries Thermal Infrared Sensor, Object mode
Measures the temperature of an objects surfaceSize and content of the sample
The sample contains one elements representing the surface temperature (in Kelvin) of an object. the sensor can read object temperatures between -90??F and 700??F (-70??C and +380??C). The sensor has a high accuracy of 0.5??C and a resolution of 0.02??C.- Returns:
- A sampleProvider
See
leJOS conventions for SampleProvidersSee Sensor datasheet
-
getAmbientMode
public SensorMode getAmbientMode()
Dexter Industries Thermal Infrared Sensor, Ambient mode
Measures the ambient temperatureSize and content of the sample
The sample contains one elements representing the ambient temperature (in Kelvin) (the temperature of the air around the sensor).- Returns:
- A sampleProvider
See
leJOS conventions for SampleProvidersSee Sensor datasheet
-
-