Skip to main content
Version: 2.4.0

Indicator

Indicator of cube

The cube has one indicator on the bottom (see Parts). The color for this indicator can be specified and the indicator can be turned on and off using the following characteristics.

PropertyValue
Characteristic UUID10B20103-5B3B-4571-9508-CF3EFCD7BBAE
PropertiesWrite
DescriptorLight Control

Write operations

Turning the indicator on and off

The indicator can be turned on and off by writing the following configuration data. For the example, the indicator is turned on in red for 160 milliseconds then turned off.

Data locationTypeContentExample
0UInt8Control type0x03 (indicator on, indicator off)
1UInt8Duration indicator is controlled0x10 (160 milliseconds)
2UInt8Number of indicators controlled0x01
3UInt8ID of the indicator controlled0x01
4UInt8Value for red indicator0xFF
5UInt8Value for green indicator0x00
6UInt8Value for blue indicator0x00

Duration indicator is controlled

The duration in which the indicator is controlled is specified with a value range between 0 to 255. A value of 0 creates no time limit, so the indicator stays on or off until the next write operation is performed. For values 1 to 255, the indicator turns on or off for 10 times the specified value in milliseconds, then turns off.

Number of indicators controlled ID of indicator controlled

Specifies the number or ID of the indicators being controlled. Only one indicator can be controlled, and both are set to 1.

Red/Green/Blue values for the indicator

Each indicator color can be specified with a value range between 0 and 255. If all of them are set to 0, the indicator is turned off.

Repeated turning on and off of indicator

The indicator can be turned on and off repeatedly by writing the following configuration data. The indicator is blinking repeatedly in green and blue every 300 milliseconds in the example.

Data locationTypeContentExample
0UInt8Control type0x04 (Repeatedly turns on and off)
1UInt8Number of repetitions0x00 (Infinite)
2UInt8Number of operations0x02 (Two operations)
3UInt8Duration indicator is controlled0x1E (300 milliseconds)
4UInt8Number of indicators controlled0x01
5UInt8ID of the indicator controlled0x01
6UInt8Value for red indicator0x00
7UInt8Value for green indicator0xFF
8UInt8Value for blue indicator0x00
9UInt8Duration indicator is controlled0x1E (300 milliseconds)
10UInt8Number of indicators controlled0x01
11UInt8ID of the indicator controlled0x01
12UInt8Value for red indicator0x00
13UInt8Value for green indicator0x00
14UInt8Value for blue indicator0xFF

Data Structure and Operation

The data for this write operation has a structure with a variable length as shown in the figure below.

Indicator Scenario Data Structure

Operation is made up of the following six items written with the Turning the indicator on and off data.

  • Duration indicator is controlled
  • Number of indicators controlled
  • ID of indicator controlled
  • Value for red indicator
  • Value for green indicator
  • Value for blue indicator

Number of repetitions

The number of times operations are repeated is specified with a value ranging between 0 and 255. 0 repeats operations for an infinite number of times, meaning that the repetition of operations does not end until the next write operation is performed. For values 1 to 255, the indicator turns off after finishing the specified number of repetitions.

Number of Operations

The number of operations is specified with a value range of 1 to 29. If the value specified is smaller than the number of operations that follow, only the number of operations specified are repeated. If the value specified is greater than the number of operations that follow, an error occurs and the write operation is discarded.

Duration indicator is controlled

The duration the indicator is controlled is specified with a value range of 1 to 255. In the range between 1 and 255, the indicator turns on and off for 10 times the value specified in milliseconds.

Turn off all indicators.

All indicators are turned off by writing the following configuration data.

Data locationTypeContentExample
0UInt8Control type0x01 (Turn off all indicators)

Turn off a specific indicator.

A specific indicator can be turned off by writing the following configuration data.

Data locationTypeContentExample
0UInt8Control type0x02 (Turn off a specific indicator)
1UInt8Number of indicators controlled0x01
2UInt8ID of indicator controlled0x01