Orphe~ Orphe

Orphe Constructor

Constructor

new Orphe(_num)

Parameters:
NameTypeDescription
_numnumber

specifies id of your ORPHE CORE Module

Members

device_information

Associative array of device information

gait

associative array for gait data

quat

associative array for quotanion

Methods

(async) begin(notification_typeopt, optionsopt) → {Promise.<string>}

begin BLE connection If options is not specified, it follows the current settings of the device.

Parameters:
NameTypeAttributesDefaultDescription
notification_typestring<optional>
"ANALYSIS"

ANALYSIS, RAW, ANALYSIS_AND_RAW

optionsobject<optional>
{range:{acc:-1, gyro:-1}}

{range:{acc:[2,4,8,16],gyro:[250,500,1000,2000]}

Returns:
Type: 
Promise.<string>

gotAcc(acc)

Parameters:
NameTypeDescription
accObject

{x,y,z}

gotCalorie(calorie)

Parameters:
NameTypeDescription
calorieObject

{value}

gotData(data)

Parameters:
NameTypeDescription
datadataview

orphe terminal専用

gotDelta(delta)

Parameters:
NameTypeDescription
deltaObject

{x,y,z}

gotDirection(direction)

Parameters:
NameTypeDescription
directionObject

{value} 0:none, 1:foward, 2:backward, 3:inside, 4:outside

gotDistance(distance)

Parameters:
NameTypeDescription
distanceObject

{value}

gotEuler(euler)

Parameters:
NameTypeDescription
eulerObject

{pitch, roll, yaw}

gotFootAngle(foot_angle)

Parameters:
NameTypeDescription
foot_angleObject

{value}

gotGait(gait)

Parameters:
NameTypeDescription
gaitObject

{type, direction, calorie, distance}

gotGyro(gyro)

Parameters:
NameTypeDescription
gyroObject

{x,y,z}

gotLandingImpact(landing_impact)

Parameters:
NameTypeDescription
landing_impactObject

{value}

gotPronation(pronation)

Parameters:
NameTypeDescription
pronationObject

{x,y,z}

gotQuat(quat)

Parameters:
NameTypeDescription
quatObject

{w, x,y,z}

gotStepsNumber(steps_number)

Parameters:
NameTypeDescription
steps_numberObject

{value}

gotStride(stride)

Parameters:
NameTypeDescription
strideObject

{x,y,z}

gotType(type)

Parameters:
NameTypeDescription
typeObject

{value} 0:none, 1:walk, 2:run, 3:stand

onRead(data, uuid)

Incoming byte callback function

Parameters:
NameTypeDescription
datadataView

incoming bytes

uuidstring

read(uuid)

Read BLE data

Parameters:
NameTypeDescription
uuidstring

DEVICE_INFORMATION

requestDevice(uuid)

Execute requestDevice()

Parameters:
NameTypeDescription
uuidstring

reset()

reset(disconnect & clear)

resetAnalysisLogs()

Reset Analysis logs in the core module.

resetMotionSensorAttitude()

Reset motion sensor attitude, quaternion culculation.

setLED(on_off, pattern)

set LED mode

Parameters:
NameTypeDescription
on_offint

0: turning off the LED, 1: turning on the LED

patternint

0-4

setLEDBrightness(value)

sets the LED Brightness

Parameters:
NameTypeDescription
valueuint8

0-255, 0:turning off the LED

setup(names)

setup UUID by predefined name, DEVICE_INFORMATION, SENSOR_VALUES, STEP_ANALYSIS

Parameters:
NameTypeDescription
namesArray.<string>

DEVICE_INFORMATION, SENSOR_VALUES, STEP_ANALYSIS

startNotify(uuid)

Stop Notification

Parameters:
NameTypeDescription
uuidstring

stop()

stop and disconnect GATT connection

stopNotify(uuid)

Stop Notification

Parameters:
NameTypeDescription
uuidstring

write(uuid, array_value)

write data to the BLE device

Parameters:
NameTypeDescription
uuidstring

DEVICE_INFORMATION, SENSOR_VALUES, STEP_ANALYSIS

array_valuedataView

write bytes