Developer

KeiganMotor Service

KeiganMotor Service

Our specific service that controls KeiganMotor.

Service UUID: f140ea35-8936-4d35-a0ed-dfcd795baa8c

Use the above UUID to scan advertising KeiganMotor.

Characteristics UUID (128bit)
Motor Control
Handles motor action
f1400001-8936-4d35-a0ed-dfcd795baa8c
Motor LED
Handles motor LED
f1400003-8936-4d35-a0ed-dfcd795baa8c
Motor Measurement
Handles position, velocity and torque of the motor
f1400004-8936-4d35-a0ed-dfcd795baa8c
Motor IMU Measurement
Handles IMU measurement
f1400005-8936-4d35-a0ed-dfcd795baa8c
Motor Settings
Handles motor settings
f1400006-8936-4d35-a0ed-dfcd795baa8c

 

KeiganMotor Service characteristics

Motor Control

read write write_without_response

Characteristics UUID: f1400001-8936-4d35-a0ed-dfcd795baa8c

KeiganMotor is controlled by writing the following commands to this characteristics.

 

Motor LED

read write write_without_response

Characteristics UUID: f1400003-8936-4d35-a0ed-dfcd795baa8c

LED of KeiganMotor is controlled by writing the following command to this characteristics.

byte [0] [1] [2] [3]
value uint8_t ledState uint8_t red uint8_t green uint8_t blue
descriptioin ledState
(See below)
red
0-255
green
0-255
blue
0-255

typedef enum ledState =
{
    LED_STATE_OFF = 0, // LED off
    LED_STATE_ON_SOLID = 1, // LED solid
    LED_STATE_ON_FLASH = 2, // LED flash 
    LED_STATE_ON_DIM = 3 // LED dim
}

 

Motor Measurement

read notify

Characteristics UUID: f1400004-8936-4d35-a0ed-dfcd795baa8c

This characteristics notifies position, velocity and torque of KeiganMotor.
The data structure is as follows.

byte [0][1][2][3] [4][5][6][7] [8][9][10][11]
value float position float velocity float torque
description absolute position
[radian]
angular velocity
[radian/second]
torque
[N*m]

 

Motor IMU Measurement

read notify

Characteristics UUID: f1400005-8936-4d35-a0ed-dfcd795baa8c

This characteristics notifies position, IMU measurement values.
The data structure is as follows.

byte [0][1] [2][3] [4][5] [6][7] [8][9] [10][11] [12][13]
value int16_t accel-x int16_t accel-y int16_t accel-z int16_t temp int16_t gyro-x int16_t gyro-y int16_t gyro-z
description x-axis acceleration
-32,768 - 32,767
y-axis acceleration
-32,768 - 32,767
z-axis acceleration
-32,768 - 32,767
temperature
-32,768 - 32,767
angular velocity around x-axis
-32,768 - 32,767
angular velocity around y-axis
-32,768 - 32,767
angular velocity around z-axis
-32,768 - 32,767

 

Motor Settings

read write write_without_response

Characteristics UUID: f1400006-8936-4d35-a0ed-dfcd795baa8c

Config KeiganMotor's settings by writing motor settings common commands to this characteristics.