openHAB - IMU Brick 2.0

Bemerkung

Die openHAB-Dokumentation ist nur auf Englisch verfügbar.

Warnung

The openHAB bindings are still in beta, but the development was stopped.

This is the description of the openHAB API bindings for the IMU Brick 2.0. General information and technical specifications for the IMU Brick 2.0 are summarized in its hardware description.

An installation guide for the openHAB API bindings is part of their general description.

Thing

UID:
  • tinkerforge:brickimuv2:[UID]
Required firmware version:
  • 2.0.10
Firmware update supported:
  • no
Channels:
Actions:
Parameters:
  • Magnetometer Rate – Type: Choice, Default: 20Hz
  • This option is auto-controlled in fusion mode.
  • Options: 2Hz, 6Hz, 8Hz, 10Hz, 15Hz, 20Hz, 25Hz, 30Hz

  • Gyroscope Range – Type: Choice, Default: 2000°/s
  • This option is auto-controlled in fusion mode.
  • Options: 2000°/s, 1000°/s, 500°/s, 250°/s, 125°/s

  • Gyroscope Bandwidth – Type: Choice, Default: 32Hz
  • This option is auto-controlled in fusion mode.
  • Options: 523Hz, 230Hz, 116Hz, 47Hz, 23Hz, 12Hz, 64Hz, 32Hz

  • Accelerometer Range – Type: Choice, Default: ±4G
  • This option is user selectable in all fusion modes.
  • Options: ±2G, ±4G, ±8G, ±16G

  • Accelerometer Bandwidth – Type: Choice, Default: 62.5Hz
  • This option is auto-controlled in fusion mode.
  • Options: 7.81Hz, 15.63Hz, 31.25Hz, 62.5Hz, 125Hz, 250Hz, 500Hz, 1000Hz

  • Sensor Fusion Mode – Type: Choice, Default: On
  • If the fusion mode is turned off, the Acceleration, Magnetic Field and Angular Velocity channels return uncalibrated and uncompensated sensor data. All other sensor channels return no data. Since firmware version 2.0.6 you can also use a fusion mode without magnetometer. In this mode the calculated orientation is relative (with magnetometer it is absolute with respect to the earth). However, the calculation can't be influenced by spurious magnetic fields. Since firmware version 2.0.13 you can also use a fusion mode without fast magnetometer calibration. This mode is the same as the normal fusion mode, but the fast magnetometer calibration is turned off. So to find the orientation the first time will likely take longer, but small magnetic influences might not affect the automatic calibration as much. By default sensor fusion is on.
  • Options: Off, On, On Without Magnetometer, On Without Fast Magnetometer Calibration

  • Acceleration Update Interval – Type: integer, Default: 1000, Unit: ms, Min: 0, Max: 4294967295
  • Specifies the update interval for the acceleration in milliseconds. A value of 0 disables automatic updates.

  • Magnetic Field Update Interval – Type: integer, Default: 1000, Unit: ms, Min: 0, Max: 4294967295
  • Specifies the update interval for the magnetic field in milliseconds. A value of 0 disables automatic updates.

  • Angular Velocity Update Interval – Type: integer, Default: 1000, Unit: ms, Min: 0, Max: 4294967295
  • Specifies the update interval for the angular velocity in milliseconds. A value of 0 disables automatic updates.

  • Orientation Update Interval – Type: integer, Default: 1000, Unit: ms, Min: 0, Max: 4294967295
  • Specifies the update interval for the orientation as euler angles in milliseconds. A value of 0 disables automatic updates.

  • Quaternion Update Interval – Type: integer, Default: 1000, Unit: ms, Min: 0, Max: 4294967295
  • Specifies the update interval for the orientation as quaternion in milliseconds. A value of 0 disables automatic updates.

  • Linear Acceleration Update Interval – Type: integer, Default: 1000, Unit: ms, Min: 0, Max: 4294967295
  • Specifies the update interval for the linear acceleration in milliseconds. A value of 0 disables automatic updates.

  • Gravity Vector Update Interval – Type: integer, Default: 1000, Unit: ms, Min: 0, Max: 4294967295
  • Specifies the update interval for the gravity vector in milliseconds. A value of 0 disables automatic updates.

  • Temperature Update Interval – Type: integer, Default: 1000, Unit: ms, Min: 0, Max: 4294967295
  • Specifies the update interval for the temperature in milliseconds. A value of 0 disables automatic updates.

  • Status LED Configuration – Type: boolean, Default: true
  • The status LED is the blue LED next to the USB connector. If enabled is is on and it flickers if data is transfered. If disabled it is always off.

  • SPITFP Enable Dynamic Baudrate – Type: boolean, Default: true
  • The SPITF protocol can be used with a dynamic baudrate. If the dynamic baudrate is enabled, the Brick will try to adapt the baudrate for the communication between Bricks and Bricklets according to the amount of data that is transferred. The baudrate will be increased exponentially if lots of data is sent/received and decreased linearly if little data is sent/received. This lowers the baudrate in applications where little data is transferred (e.g. a weather station) and increases the robustness. If there is lots of data to transfer (e.g. Thermal Imaging Bricklet) it automatically increases the baudrate as needed. In cases where some data has to transferred as fast as possible every few seconds (e.g. RS485 Bricklet with a high baudrate but small payload) you may want to turn the dynamic baudrate off to get the highest possible performance. The maximum value of the baudrate can be set per port. If the dynamic baudrate is disabled, the maximum baudrate will be used statically.

  • SPITFP Minimum Dynamic Baudrate – Type: integer, Default: 400000, Min: 400000, Max: 2000000
  • See SPITFP Enable Dynamic Baudrate

  • (Maximum) SPITFP Baudrate Port A – Type: integer, Default: 1400000, Min: 400000, Max: 2000000
  • The baudrate for Bricklet port A. If you want to increase the throughput of Bricklets you can increase the baudrate. If you get a high error count because of high interference you can decrease the baudrate. If the dynamic baudrate feature is enabled, this is the maximum baudrate. Regulatory testing is done with the default baudrate. If CE compatibility or similar is necessary in your applications we recommend to not change the baudrate.

  • (Maximum) SPITFP Baudrate Port B – Type: integer, Default: 1400000, Min: 400000, Max: 2000000
  • The baudrate for Bricklet port B. If you want to increase the throughput of Bricklets you can increase the baudrate. If you get a high error count because of high interference you can decrease the baudrate. If the dynamic baudrate feature is enabled, this is the maximum baudrate. Regulatory testing is done with the default baudrate. If CE compatibility or similar is necessary in your applications we recommend to not change the baudrate.

Channels

Acceleration - X

The acceleration from the accelerometer for the x, y and z axis in m/s².

Type:
  • Number:Acceleration
UID:
  • tinkerforge:brickimuv2:[UID]:BrickIMUV2AccelerationX
Read only:
  • Yes
Unit:
  • Meter Per Square Second
Acceleration - Y

The acceleration from the accelerometer for the x, y and z axis in m/s².

Type:
  • Number:Acceleration
UID:
  • tinkerforge:brickimuv2:[UID]:BrickIMUV2AccelerationY
Read only:
  • Yes
Unit:
  • Meter Per Square Second
Acceleration - Z

The acceleration from the accelerometer for the x, y and z axis in m/s².

Type:
  • Number:Acceleration
UID:
  • tinkerforge:brickimuv2:[UID]:BrickIMUV2AccelerationZ
Read only:
  • Yes
Unit:
  • Meter Per Square Second
Magnetic Field - X

The calibrated magnetic field from the magnetometer for the x, y and z axis in Tesla.

Type:
  • Number:MagneticFluxDensity
UID:
  • tinkerforge:brickimuv2:[UID]:BrickIMUV2MagneticFieldX
Read only:
  • Yes
Unit:
  • Tesla
Range:
  • -0.0025 Tesla to 0.0025 Tesla (Step 6.25e-08 Tesla)
Magnetic Field - Y

The calibrated magnetic field from the magnetometer for the x, y and z axis in Tesla.

Type:
  • Number:MagneticFluxDensity
UID:
  • tinkerforge:brickimuv2:[UID]:BrickIMUV2MagneticFieldY
Read only:
  • Yes
Unit:
  • Tesla
Range:
  • -0.0025 Tesla to 0.0025 Tesla (Step 6.25e-08 Tesla)
Magnetic Field - Z

The calibrated magnetic field from the magnetometer for the x, y and z axis in Tesla.

Type:
  • Number:MagneticFluxDensity
UID:
  • tinkerforge:brickimuv2:[UID]:BrickIMUV2MagneticFieldZ
Read only:
  • Yes
Unit:
  • Tesla
Range:
  • -0.0025 Tesla to 0.0025 Tesla (Step 6.25e-08 Tesla)
Angular Velocity - X

The calibrated angular velocity from the gyroscope for the x, y and z axis in °/s.

Type:
  • Number:Dimensionless
UID:
  • tinkerforge:brickimuv2:[UID]:BrickIMUV2AngularVelocityX
Read only:
  • Yes
Angular Velocity - Y

The calibrated angular velocity from the gyroscope for the x, y and z axis in °/s.

Type:
  • Number:Dimensionless
UID:
  • tinkerforge:brickimuv2:[UID]:BrickIMUV2AngularVelocityY
Read only:
  • Yes
Angular Velocity - Z

The calibrated angular velocity from the gyroscope for the x, y and z axis in °/s.

Type:
  • Number:Dimensionless
UID:
  • tinkerforge:brickimuv2:[UID]:BrickIMUV2AngularVelocityZ
Read only:
  • Yes
Orientation - Heading

The current orientation (heading, roll, pitch) of the IMU Brick as independent Euler angles in 1/16 degree. Note that Euler angles always experience a gimbal lock. We recommend that you use quaternions instead, if you need the absolute orientation.

Type:
  • Number:Angle
UID:
  • tinkerforge:brickimuv2:[UID]:BrickIMUV2OrientationHeading
Read only:
  • Yes
Unit:
  • Degree Angle
Range:
  • -180 Degree Angle to 360 Degree Angle (Step 0.0625 Degree Angle)
Orientation - Roll

The current orientation (heading, roll, pitch) of the IMU Brick as independent Euler angles in 1/16 degree. Note that Euler angles always experience a gimbal lock. We recommend that you use quaternions instead, if you need the absolute orientation.

Type:
  • Number:Angle
UID:
  • tinkerforge:brickimuv2:[UID]:BrickIMUV2OrientationRoll
Read only:
  • Yes
Unit:
  • Degree Angle
Range:
  • -180 Degree Angle to 360 Degree Angle (Step 0.0625 Degree Angle)
Orientation - Pitch

The current orientation (heading, roll, pitch) of the IMU Brick as independent Euler angles in 1/16 degree. Note that Euler angles always experience a gimbal lock. We recommend that you use quaternions instead, if you need the absolute orientation.

Type:
  • Number:Angle
UID:
  • tinkerforge:brickimuv2:[UID]:BrickIMUV2OrientationPitch
Read only:
  • Yes
Unit:
  • Degree Angle
Range:
  • -180 Degree Angle to 360 Degree Angle (Step 0.0625 Degree Angle)
Quaternion - W

The current orientation (w, x, y, z) of the IMU Brick as quaternions.

Type:
  • Number:Dimensionless
UID:
  • tinkerforge:brickimuv2:[UID]:BrickIMUV2QuaternionW
Read only:
  • Yes
Range:
  • -1 to 1 (Step 6.103888176768602e-05)
Quaternion - X

The current orientation (w, x, y, z) of the IMU Brick as quaternions.

Type:
  • Number:Dimensionless
UID:
  • tinkerforge:brickimuv2:[UID]:BrickIMUV2QuaternionX
Read only:
  • Yes
Range:
  • -1 to 1 (Step 6.103888176768602e-05)
Quaternion - Y

The current orientation (w, x, y, z) of the IMU Brick as quaternions.

Type:
  • Number:Dimensionless
UID:
  • tinkerforge:brickimuv2:[UID]:BrickIMUV2QuaternionY
Read only:
  • Yes
Range:
  • -1 to 1 (Step 6.103888176768602e-05)
Quaternion - Z

The current orientation (w, x, y, z) of the IMU Brick as quaternions.

Type:
  • Number:Dimensionless
UID:
  • tinkerforge:brickimuv2:[UID]:BrickIMUV2QuaternionZ
Read only:
  • Yes
Range:
  • -1 to 1 (Step 6.103888176768602e-05)
Linear Acceleration - X

The linear acceleration from the accelerometer for the x, y and z axis in m/s. The linear acceleration is the acceleration in each of the three axis of the IMU Brick with the influences of gravity removed.

Type:
  • Number:Acceleration
UID:
  • tinkerforge:brickimuv2:[UID]:BrickIMUV2LinearAccelerationX
Read only:
  • Yes
Unit:
  • Meter Per Square Second
Linear Acceleration - Y

The linear acceleration from the accelerometer for the x, y and z axis in m/s. The linear acceleration is the acceleration in each of the three axis of the IMU Brick with the influences of gravity removed.

Type:
  • Number:Acceleration
UID:
  • tinkerforge:brickimuv2:[UID]:BrickIMUV2LinearAccelerationY
Read only:
  • Yes
Unit:
  • Meter Per Square Second
Linear Acceleration - Z

The linear acceleration from the accelerometer for the x, y and z axis in m/s. The linear acceleration is the acceleration in each of the three axis of the IMU Brick with the influences of gravity removed.

Type:
  • Number:Acceleration
UID:
  • tinkerforge:brickimuv2:[UID]:BrickIMUV2LinearAccelerationZ
Read only:
  • Yes
Unit:
  • Meter Per Square Second
Gravity Vector - X

The current gravity vector of the IMU Brick for the x, y and z axis in g (1g = 9.80665m/s²). The gravity vector is the acceleration that occurs due to gravity. Influences of additional linear acceleration are removed.

Type:
  • Number:Acceleration
UID:
  • tinkerforge:brickimuv2:[UID]:BrickIMUV2GravityVectorX
Read only:
  • Yes
Unit:
  • Standard Gravity
Range:
  • -1.0003416049313476 Standard Gravity to 1.0003416049313476 Standard Gravity (Step 0.0010197162129779282 Standard Gravity)
Gravity Vector - Y

The current gravity vector of the IMU Brick for the x, y and z axis in g (1g = 9.80665m/s²). The gravity vector is the acceleration that occurs due to gravity. Influences of additional linear acceleration are removed.

Type:
  • Number:Acceleration
UID:
  • tinkerforge:brickimuv2:[UID]:BrickIMUV2GravityVectorY
Read only:
  • Yes
Unit:
  • Standard Gravity
Range:
  • -1.0003416049313476 Standard Gravity to 1.0003416049313476 Standard Gravity (Step 0.0010197162129779282 Standard Gravity)
Gravity Vector - Z

The current gravity vector of the IMU Brick for the x, y and z axis in g (1g = 9.80665m/s²). The gravity vector is the acceleration that occurs due to gravity. Influences of additional linear acceleration are removed.

Type:
  • Number:Acceleration
UID:
  • tinkerforge:brickimuv2:[UID]:BrickIMUV2GravityVectorZ
Read only:
  • Yes
Unit:
  • Standard Gravity
Range:
  • -1.0003416049313476 Standard Gravity to 1.0003416049313476 Standard Gravity (Step 0.0010197162129779282 Standard Gravity)
Temperature

The temperature of the IMU Brick. The temperature is given in °C. The temperature is measured in the core of the BNO055 IC, it is not the ambient temperature.

Type:
  • Number:Temperature
UID:
  • tinkerforge:brickimuv2:[UID]:BrickIMUV2Temperature
Read only:
  • Yes
Unit:
  • Celsius
Enable LEDs

Enable/disable the orientation and direction LEDs of the IMU Brick.

Type:
  • Switch
UID:
  • tinkerforge:brickimuv2:[UID]:BrickIMUV2EnableLEDs
Read only:
  • No

Actions

Actions can be used in rules by creating an action object. All actions return a Map<String, Object>. Returned values can be accessed by name, sometimes the type deduction needs some hints, as shown below:

val actions = getActions("tinkerforge", "tinkerforge:brickimuv2:[UID]")
val hwVersion = actions.brickIMUV2GetIdentity().get("hardwareVersion") as short[]
logInfo("Example", "Hardware version: " + hwVersion.get(0) + "." + hwVersion.get(1) + "." + hwVersion.get(2))

Basic Actions

brickIMUV2GetOrientation()
Return Map:
  • heading – Type: short, Unit: 1/16 °, Range: [0 to 5760]
  • roll – Type: short, Unit: 1/16 °, Range: [-1440 to 1440]
  • pitch – Type: short, Unit: 1/16 °, Range: [-2880 to 2880]

Returns the current orientation (heading, roll, pitch) of the IMU Brick as independent Euler angles. Note that Euler angles always experience a gimbal lock. We recommend that you use quaternions instead, if you need the absolute orientation.

If you want to get the orientation periodically, it is recommended to use the Orientation - Heading channel and set the period with the thing configuration.

brickIMUV2GetLinearAcceleration()
Return Map:
  • x – Type: short, Unit: 1 cm/s², Range: ?
  • y – Type: short, Unit: 1 cm/s², Range: ?
  • z – Type: short, Unit: 1 cm/s², Range: ?

Returns the linear acceleration of the IMU Brick for the x, y and z axis. The acceleration is in the range configured with the thing configuration.

The linear acceleration is the acceleration in each of the three axis of the IMU Brick with the influences of gravity removed.

It is also possible to get the gravity vector with the influence of linear acceleration removed, see Gravity Vector - X.

If you want to get the linear acceleration periodically, it is recommended to use the Linear Acceleration - X channel and set the period with the thing configuration.

brickIMUV2GetGravityVector()
Return Map:
  • x – Type: short, Unit: 1 cm/s², Range: [-981 to 981]
  • y – Type: short, Unit: 1 cm/s², Range: [-981 to 981]
  • z – Type: short, Unit: 1 cm/s², Range: [-981 to 981]

Returns the current gravity vector of the IMU Brick for the x, y and z axis.

The gravity vector is the acceleration that occurs due to gravity. Influences of additional linear acceleration are removed.

It is also possible to get the linear acceleration with the influence of gravity removed, see Linear Acceleration - X.

If you want to get the gravity vector periodically, it is recommended to use the Gravity Vector - X channel and set the period with the thing configuration.

brickIMUV2GetQuaternion()
Return Map:
  • w – Type: short, Unit: 1/16383, Range: [-214 + 1 to 214 - 1]
  • x – Type: short, Unit: 1/16383, Range: [-214 + 1 to 214 - 1]
  • y – Type: short, Unit: 1/16383, Range: [-214 + 1 to 214 - 1]
  • z – Type: short, Unit: 1/16383, Range: [-214 + 1 to 214 - 1]

Returns the current orientation (w, x, y, z) of the IMU Brick as quaternions.

You have to divide the return values by 16383 (14 bit) to get the usual range of -1.0 to +1.0 for quaternions.

If you want to get the quaternions periodically, it is recommended to use the Quaternion - W channel and set the period with the thing configuration.

brickIMUV2GetAllData()
Return Map:
  • acceleration – Type: short[], Length: 3
    • 0: x – Type: short, Unit: 1 cm/s², Range: ?
    • 1: y – Type: short, Unit: 1 cm/s², Range: ?
    • 2: z – Type: short, Unit: 1 cm/s², Range: ?
  • magneticField – Type: short[], Length: 3
    • 0: x – Type: short, Unit: 1/16 µT, Range: [-20800 to 20800]
    • 1: y – Type: short, Unit: 1/16 µT, Range: [-20800 to 20800]
    • 2: z – Type: short, Unit: 1/16 µT, Range: [-40000 to 40000]
  • angularVelocity – Type: short[], Length: 3
    • 0: x – Type: short, Unit: 1/16 °/s, Range: ?
    • 1: y – Type: short, Unit: 1/16 °/s, Range: ?
    • 2: z – Type: short, Unit: 1/16 °/s, Range: ?
  • eulerAngle – Type: short[], Length: 3
    • 0: heading – Type: short, Unit: 1/16 °, Range: [0 to 5760]
    • 1: roll – Type: short, Unit: 1/16 °, Range: [-1440 to 1440]
    • 2: pitch – Type: short, Unit: 1/16 °, Range: [-2880 to 2880]
  • quaternion – Type: short[], Length: 4
    • 0: w – Type: short, Unit: 1/16383, Range: [-214 + 1 to 214 - 1]
    • 1: x – Type: short, Unit: 1/16383, Range: [-214 + 1 to 214 - 1]
    • 2: y – Type: short, Unit: 1/16383, Range: [-214 + 1 to 214 - 1]
    • 3: z – Type: short, Unit: 1/16383, Range: [-214 + 1 to 214 - 1]
  • linearAcceleration – Type: short[], Length: 3
    • 0: x – Type: short, Unit: 1 cm/s², Range: ?
    • 1: y – Type: short, Unit: 1 cm/s², Range: ?
    • 2: z – Type: short, Unit: 1 cm/s², Range: ?
  • gravityVector – Type: short[], Length: 3
    • 0: x – Type: short, Unit: 1 cm/s², Range: [-981 to 981]
    • 1: y – Type: short, Unit: 1 cm/s², Range: [-981 to 981]
    • 2: z – Type: short, Unit: 1 cm/s², Range: [-981 to 981]
  • temperature – Type: byte, Unit: 1 °C, Range: [-128 to 127]
  • calibrationStatus – Type: short, Range: [0 to 255]

Return all of the available data of the IMU Brick.

The calibration status consists of four pairs of two bits. Each pair of bits represents the status of the current calibration.

  • bit 0-1: Magnetometer
  • bit 2-3: Accelerometer
  • bit 4-5: Gyroscope
  • bit 6-7: System

A value of 0 means for "not calibrated" and a value of 3 means "fully calibrated". In your program you should always be able to ignore the calibration status, it is used by the calibration window of the Brick Viewer and it can be ignored after the first calibration. See the documentation in the calibration window for more information regarding the calibration of the IMU Brick.

brickIMUV2LedsOn()

Turns the orientation and direction LEDs of the IMU Brick on.

brickIMUV2LedsOff()

Turns the orientation and direction LEDs of the IMU Brick off.

Advanced Actions

brickIMUV2GetAcceleration()
Return Map:
  • x – Type: short, Unit: 1 cm/s², Range: ?
  • y – Type: short, Unit: 1 cm/s², Range: ?
  • z – Type: short, Unit: 1 cm/s², Range: ?

Returns the calibrated acceleration from the accelerometer for the x, y and z axis. The acceleration is in the range configured with the thing configuration.

If you want to get the acceleration periodically, it is recommended to use the Acceleration - X channel and set the period with the thing configuration.

brickIMUV2GetMagneticField()
Return Map:
  • x – Type: short, Unit: 1/16 µT, Range: [-20800 to 20800]
  • y – Type: short, Unit: 1/16 µT, Range: [-20800 to 20800]
  • z – Type: short, Unit: 1/16 µT, Range: [-40000 to 40000]

Returns the calibrated magnetic field from the magnetometer for the x, y and z axis.

If you want to get the magnetic field periodically, it is recommended to use the Magnetic Field - X channel and set the period with the thing configuration.

brickIMUV2GetAngularVelocity()
Return Map:
  • x – Type: short, Unit: 1/16 °/s, Range: ?
  • y – Type: short, Unit: 1/16 °/s, Range: ?
  • z – Type: short, Unit: 1/16 °/s, Range: ?

Returns the calibrated angular velocity from the gyroscope for the x, y and z axis. The angular velocity is in the range configured with the thing configuration.

If you want to get the angular velocity periodically, it is recommended to use the Angular Velocity - X achannel nd set the period with the thing configuration.

brickIMUV2GetTemperature()
Return Map:
  • temperature – Type: byte, Unit: 1 °C, Range: [-128 to 127]

Returns the temperature of the IMU Brick. The temperature is measured in the core of the BNO055 IC, it is not the ambient temperature

brickIMUV2GetSensorConfiguration()
Return Map:
  • magnetometerRate – Type: short, Range: See constants, Default: 5
  • gyroscopeRange – Type: short, Range: See constants, Default: 0
  • gyroscopeBandwidth – Type: short, Range: See constants, Default: 7
  • accelerometerRange – Type: short, Range: See constants, Default: 1
  • accelerometerBandwidth – Type: short, Range: See constants, Default: 3

Returns the sensor configuration as set by the thing configuration.

The following constants are available for this function:

For magnetometerRate:

  • val MAGNETOMETER_RATE_2HZ = 0
  • val MAGNETOMETER_RATE_6HZ = 1
  • val MAGNETOMETER_RATE_8HZ = 2
  • val MAGNETOMETER_RATE_10HZ = 3
  • val MAGNETOMETER_RATE_15HZ = 4
  • val MAGNETOMETER_RATE_20HZ = 5
  • val MAGNETOMETER_RATE_25HZ = 6
  • val MAGNETOMETER_RATE_30HZ = 7

For gyroscopeRange:

  • val GYROSCOPE_RANGE_2000DPS = 0
  • val GYROSCOPE_RANGE_1000DPS = 1
  • val GYROSCOPE_RANGE_500DPS = 2
  • val GYROSCOPE_RANGE_250DPS = 3
  • val GYROSCOPE_RANGE_125DPS = 4

For gyroscopeBandwidth:

  • val GYROSCOPE_BANDWIDTH_523HZ = 0
  • val GYROSCOPE_BANDWIDTH_230HZ = 1
  • val GYROSCOPE_BANDWIDTH_116HZ = 2
  • val GYROSCOPE_BANDWIDTH_47HZ = 3
  • val GYROSCOPE_BANDWIDTH_23HZ = 4
  • val GYROSCOPE_BANDWIDTH_12HZ = 5
  • val GYROSCOPE_BANDWIDTH_64HZ = 6
  • val GYROSCOPE_BANDWIDTH_32HZ = 7

For accelerometerRange:

  • val ACCELEROMETER_RANGE_2G = 0
  • val ACCELEROMETER_RANGE_4G = 1
  • val ACCELEROMETER_RANGE_8G = 2
  • val ACCELEROMETER_RANGE_16G = 3

For accelerometerBandwidth:

  • val ACCELEROMETER_BANDWIDTH_7_81HZ = 0
  • val ACCELEROMETER_BANDWIDTH_15_63HZ = 1
  • val ACCELEROMETER_BANDWIDTH_31_25HZ = 2
  • val ACCELEROMETER_BANDWIDTH_62_5HZ = 3
  • val ACCELEROMETER_BANDWIDTH_125HZ = 4
  • val ACCELEROMETER_BANDWIDTH_250HZ = 5
  • val ACCELEROMETER_BANDWIDTH_500HZ = 6
  • val ACCELEROMETER_BANDWIDTH_1000HZ = 7

Neu in Version 2.0.5 (Firmware).

brickIMUV2GetSensorFusionMode()
Return Map:
  • mode – Type: short, Range: See constants, Default: 1

Returns the sensor fusion mode as set by the thing configuration.

The following constants are available for this function:

For mode:

  • val SENSOR_FUSION_OFF = 0
  • val SENSOR_FUSION_ON = 1
  • val SENSOR_FUSION_ON_WITHOUT_MAGNETOMETER = 2
  • val SENSOR_FUSION_ON_WITHOUT_FAST_MAGNETOMETER_CALIBRATION = 3

Neu in Version 2.0.5 (Firmware).

brickIMUV2GetIdentity()
Return Map:
  • uid – Type: String, Length: up to 8
  • connectedUid – Type: String, Length: up to 8
  • position – Type: char, Range: ['0' to '8']
  • hardwareVersion – Type: short[], Length: 3
    • 0: major – Type: short, Range: [0 to 255]
    • 1: minor – Type: short, Range: [0 to 255]
    • 2: revision – Type: short, Range: [0 to 255]
  • firmwareVersion – Type: short[], Length: 3
    • 0: major – Type: short, Range: [0 to 255]
    • 1: minor – Type: short, Range: [0 to 255]
    • 2: revision – Type: short, Range: [0 to 255]
  • deviceIdentifier – Type: int, Range: [0 to 216 - 1]

Returns the UID, the UID where the Brick is connected to, the position, the hardware and firmware version as well as the device identifier.

The position is the position in the stack from '0' (bottom) to '8' (top).

The device identifier numbers can be found here

brickIMUV2IsStatusLEDEnabled()
Return Map:
  • enabled – Type: boolean, Default: true

Returns true if the status LED is enabled, false otherwise.

brickIMUV2GetChipTemperature()
Return Map:
  • temperature – Type: short, Unit: 1/10 °C, Range: [-215 to 215 - 1]

Returns the temperature as measured inside the microcontroller. The value returned is not the ambient temperature!

The temperature is only proportional to the real temperature and it has an accuracy of ±15%. Practically it is only useful as an indicator for temperature changes.

brickIMUV2GetSendTimeoutCount(short communicationMethod)
Parameters:
  • communicationMethod – Type: short, Range: See constants
Return Map:
  • timeoutCount – Type: long, Range: [0 to 232 - 1]

Returns the timeout count for the different communication methods.

The methods 0-2 are available for all Bricks, 3-7 only for Master Bricks.

This function is mostly used for debugging during development, in normal operation the counters should nearly always stay at 0.

The following constants are available for this function:

For communicationMethod:

  • val COMMUNICATION_METHOD_NONE = 0
  • val COMMUNICATION_METHOD_USB = 1
  • val COMMUNICATION_METHOD_SPI_STACK = 2
  • val COMMUNICATION_METHOD_CHIBI = 3
  • val COMMUNICATION_METHOD_RS485 = 4
  • val COMMUNICATION_METHOD_WIFI = 5
  • val COMMUNICATION_METHOD_ETHERNET = 6
  • val COMMUNICATION_METHOD_WIFI_V2 = 7

Neu in Version 2.0.7 (Firmware).

brickIMUV2GetSPITFPBaudrateConfig()
Return Map:
  • enableDynamicBaudrate – Type: boolean, Default: true
  • minimumDynamicBaudrate – Type: long, Unit: 1 Bd, Range: [400000 to 2000000], Default: 400000

Returns the baudrate config, see the thing configuration.

Neu in Version 2.0.10 (Firmware).

brickIMUV2GetSPITFPErrorCount(char brickletPort)
Parameters:
  • brickletPort – Type: char, Range: ['a' to 'b']
Return Map:
  • errorCountACKChecksum – Type: long, Range: [0 to 232 - 1]
  • errorCountMessageChecksum – Type: long, Range: [0 to 232 - 1]
  • errorCountFrame – Type: long, Range: [0 to 232 - 1]
  • errorCountOverflow – Type: long, Range: [0 to 232 - 1]

Returns the error count for the communication between Brick and Bricklet.

The errors are divided into

  • ACK checksum errors,
  • message checksum errors,
  • framing errors and
  • overflow errors.

The errors counts are for errors that occur on the Brick side. All Bricklets have a similar function that returns the errors on the Bricklet side.

Neu in Version 2.0.5 (Firmware).

brickIMUV2GetSPITFPBaudrate(char brickletPort)
Parameters:
  • brickletPort – Type: char, Range: ['a' to 'b']
Return Map:
  • baudrate – Type: long, Unit: 1 Bd, Range: [400000 to 2000000], Default: 1400000

Returns the baudrate for a given Bricklet port, see the thing configuration.

Neu in Version 2.0.5 (Firmware).