Warning
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.
UID:
- tinkerforge:brickimuv2:[UID]
Required firmware version:
- 2.0.10
Firmware update supported:
- no
Channels:
- Acceleration - X
- Acceleration - Y
- Acceleration - Z
- Magnetic Field - X
- Magnetic Field - Y
- Magnetic Field - Z
- Angular Velocity - X
- Angular Velocity - Y
- Angular Velocity - Z
- Orientation - Heading
- Orientation - Roll
- Orientation - Pitch
- Quaternion - W
- Quaternion - X
- Quaternion - Y
- Quaternion - Z
- Linear Acceleration - X
- Linear Acceleration - Y
- Linear Acceleration - Z
- Gravity Vector - X
- Gravity Vector - Y
- Gravity Vector - Z
- Temperature
- Enable LEDs
Actions:
- GetOrientation
- GetLinearAcceleration
- GetGravityVector
- GetQuaternion
- GetAllData
- LedsOn
- LedsOff
- GetAcceleration
- GetMagneticField
- GetAngularVelocity
- GetTemperature
- GetSensorConfiguration
- GetSensorFusionMode
- GetIdentity
- IsStatusLEDEnabled
- GetChipTemperature
- GetSendTimeoutCount
- GetSPITFPBaudrateConfig
- GetSPITFPErrorCount
- GetSPITFPBaudrate
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.
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 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))
brickIMUV2GetOrientation
()¶Return Map: |
|
---|
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: |
|
---|
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: |
|
---|
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: |
|
---|
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: |
|
---|
Return all of the available data of the IMU Brick.
Acceleration - X
)Magnetic Field - X
)Angular Velocity - X
)Orientation - Heading
)Quaternion - W
)Linear Acceleration - X
)Gravity Vector - X
)Temperature
)The calibration status consists of four pairs of two bits. Each pair of bits represents the status of the current calibration.
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.
brickIMUV2GetAcceleration
()¶Return Map: |
|
---|
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: |
|
---|
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: |
|
---|
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: |
|
---|
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: |
|
---|
Returns the sensor configuration as set by the thing configuration.
The following constants are available for this function:
For magnetometerRate:
For gyroscopeRange:
For gyroscopeBandwidth:
For accelerometerRange:
For accelerometerBandwidth:
New in version 2.0.5 (Firmware).
brickIMUV2GetSensorFusionMode
()¶Return Map: |
|
---|
Returns the sensor fusion mode as set by the thing configuration.
The following constants are available for this function:
For mode:
New in version 2.0.5 (Firmware).
brickIMUV2GetIdentity
()¶Return Map: |
|
---|
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: |
|
---|
Returns true if the status LED is enabled, false otherwise.
brickIMUV2GetChipTemperature
()¶Return Map: |
|
---|
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: |
|
---|---|
Return Map: |
|
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:
New in version 2.0.7 (Firmware).
brickIMUV2GetSPITFPBaudrateConfig
()¶Return Map: |
|
---|
Returns the baudrate config, see the thing configuration.
New in version 2.0.10 (Firmware).
brickIMUV2GetSPITFPErrorCount
(char brickletPort)¶Parameters: |
|
---|---|
Return Map: |
|
Returns the error count for the communication between Brick and Bricklet.
The errors are divided into
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.
New in version 2.0.5 (Firmware).
brickIMUV2GetSPITFPBaudrate
(char brickletPort)¶Parameters: |
|
---|---|
Return Map: |
|
Returns the baudrate for a given Bricklet port, see the thing configuration.
New in version 2.0.5 (Firmware).