Skip to main content
Version: 2.3.0

Motion detection

The cube can detect information on the state of the cube such as the cube posture and collisions with motion sensors (6-axis detection system).

This information can be obtained using the following characteristics. The characteristics are the same as for Magnetic sensor and Posture Angle detection.

PropertyValue
Characteristic UUID10B20106-5B3B-4571-9508-CF3EFCD7BBAE
PropertiesWrite, Read, Notify
DescriptorSensor Information

Write operations#

Requesting motion detection information#

The following data can be written to request motion detection information. When the cube receives a request, it sends one notification with the motion detection information.

Data locationTypeContentExample
0UInt8Information type0x81 (Request for motion detection information)

Read operations / Notifications #

When the cube's motion sensor information changes, this characteristic notifies the BLE central of the new information. The notified information can also be obtained with a read operation.

note

The characteristics are the same as those for Magnetic sensor and Posture Angle Detection. As this information is also obtained, please also see Magnetic sensor - Read operations / Notifications and Posture Angle detection - Read operations / Notifications when using.

Obtaining motion detection information#

Information on the cube's motion detection can be obtained with the following configuration data.

Data locationTypeContentExample
0UInt8Information type0x01 (Detection)
1UInt8Horizontal detection0x00 (Not horizontal)
2UInt8Collision detection0x00 (No collision)
3UInt8Double-tap detection0x00 (No double-tap)
4UInt8Posture detection0x01 (Posture facing forward)
5UInt8Shake detection0x00 (No shake)

Horizontal detection#

When the cube is horizontal, the value is 0x01 (horizontal), and when it is tilted at more than a certain angle (θ in the figure below), the value becomes 0x00 (not horizontal). The angle threshold can be set under Configuration - Horizontal detection threshold settings.

Flat Status Threshold - Roll

Roll orientation

.

Flat Status Threshold - Pitch

Pitch orientation

.

Collision detection#

When something collides with the cube, the value changes from 0x00 (no collision) to 0x01 (collision). The threshold for the size of the collision that is detected can be set under Configuration - Collision detection threshold settings.

Double-tap detection#

If the cube is tapped once and then tapped again within a certain period of time, the value changes from 0x00 (no double-tap) to 0x01 (with double-tap). The time interval between taps can be set under Configuration - Double-tap detection time interval settings. The settings for the strength of taps that are detected are the same as for Configuration - Collision detection threshold settings.

Posture detection#

This value changes when the orientation of the cube changes relative to the horizontal plane. The correlation between the values and the posture is as follows.

ValueCube posture
1Top faces upward
2Bottom faces upward
3Rear side faces upward
4Front side faces upward
5Right side faces upward
6Left side faces upward

Cube Posture (Normal and Up-side Down)

Cube posture: from left to right 1: Top faces upward and 2: Bottom faces upward

.

Cube Posture (Front-side Down and Back-side Down)

Cube posture: from left to right 3: Rear side faces upward and 4: front side faces upward

.

Cube Posture (Left-side Down and Right-side Down)

Cube posture: from left to right 5: Right side faces upward and 6: Left side faces upward

.

Shake detection#

When the cube is shook, this value changes from 0x00 (no detection) to a value between 0x01 (Level 1) and 0x0a (Level 10) depending on the strength of the shake.