Class DexterIMUSensor
- java.lang.Object
-
- lejos.hardware.Device
-
- lejos.hardware.sensor.BaseSensor
-
- lejos.hardware.sensor.DexterIMUSensor
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,SensorMode,SensorModes,SampleProvider
public class DexterIMUSensor extends BaseSensor implements SensorModes
Dexter Industries dIMU Sensor
An accelerometer and gyroscope for the LEGO?? MINDSTORMS?? NXT and EV3.Supported modes Mode name Description unit(s) Getter Rate The Rate mode measures the angular speed of the sensor over three axes Degrees/second getRateMode()Acceleration The Acceleration mode measures the linear acceleration of the sensor over three axes Metres/second^2 getAccelerationMode()Temperature The Temperature mode measures the internal temperature of the sensors gyroscope IC Degrees Celcius getTemperatureMode()Sensor configuration
The sensor cannot be configured directly. The internal update frequency of the sensor is adjusted automaticly to match the I2C port speed.See Sensor datasheet See Sensor Product page See The leJOS sensor framework See
leJOS conventions for SampleProviders- Author:
- Aswin Bouwmeester
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classDexterIMUSensor.DexterIMUAccelerationSensorClass to access the Acceleration sensor from Dexter Industries IMU the acceleration sensor is the Freescale MMA7455
-
Field Summary
Fields Modifier and Type Field Description protected intAccel_I2C_addressprotected intGyro_I2C_address-
Fields inherited from class lejos.hardware.sensor.BaseSensor
currentMode, modes
-
-
Constructor Summary
Constructors Constructor Description DexterIMUSensor(I2CPort port)DexterIMUSensor(Port port)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SampleProvidergetAccelerationMode()Dexter Industries dIMU Sensor, Acceleration Mode
The Acceleration mode measures the linear acceleration of the sensor over three axesSampleProvidergetRateMode()Dexter Industries dIMU Sensor, Rate Mode
The Rate mode measures the angular speed of the sensor over three axesSampleProvidergetTemperatureMode()Dexter Industries dIMU Sensor, Temperature Mode
The Temperature mode measures the internal temperature of the sensors gyroscope IC-
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
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface lejos.robotics.SampleProvider
fetchSample, sampleSize
-
Methods inherited from interface lejos.hardware.sensor.SensorMode
getName
-
Methods inherited from interface lejos.hardware.sensor.SensorModes
getAvailableModes, getCurrentMode, getMode, getMode, getModeCount, setCurrentMode, setCurrentMode
-
-
-
-
Method Detail
-
getAccelerationMode
public SampleProvider getAccelerationMode()
Dexter Industries dIMU Sensor, Acceleration Mode
The Acceleration mode measures the linear acceleration of the sensor over three axesSize and content of the sample
The sample contains three elements. Each element gives the linear acceleration (in metres/second^2) of the sensor over a single axis. The order of the axes in the sample is X, Y and Z.Configuration
The sensor is configured for a dynamic range of -2G tot 2G and an internal update rate of 125 Hertz. Currently there are no configurable settings.- Returns:
- A sampleProvider
See
leJOS conventions for SampleProvidersSee Freescale MMA7455L datasheet
-
getRateMode
public SampleProvider getRateMode()
Dexter Industries dIMU Sensor, Rate Mode
The Rate mode measures the angular speed of the sensor over three axesSize and content of the sample
The sample contains three elements. Each element gives the angular speed (in degrees/second) of the sensor over a single axis. The order of the axes in the sample is X, Y and Z.Configuration
The sensor is configured for a dynamic range from -2000 to 2000 degrees/second. The internal sample rate is 100 Hertz by default and 400 Hertz when the sensor port is configured for high speed. Currently there are no configurable settings.- Returns:
- A sampleProvider
See
leJOS conventions for SampleProvidersSee ST L3G4200D datasheet
-
getTemperatureMode
public SampleProvider getTemperatureMode()
Dexter Industries dIMU Sensor, Temperature Mode
The Temperature mode measures the internal temperature of the sensors gyroscope ICSize and content of the sample
The sample contains one elements providing the internal temperature (in gegrees Celcius) of the gyro sensors. Please note that the internal temperature of the sensor will exceed the temperature of the environment when the sensor is in use.Configuration
The temperature range of the sensor is -40 to 85 degrees Celcius. The update rate is 1 Hertz. There are no configurable settings.- Returns:
- A sampleProvider
See
leJOS conventions for SampleProvidersSee ST L3G4200D datasheet
-
-