Skip to main content

bn.onGyroscopeChange

onGyroscopeChange(cb): void

description Monitor gyro data change events. Frequency basis bn.startGyroscope() of interval Parameters. Can be used bn.stopGyroscope() Stop listening.

example

 bn.onGyroscopeChange(callback)

Parameters

NameType
cbOnGyroscopeChangeCallback

Returns

void


OnGyroscopeChangeCallback

Ƭ OnGyroscopeChangeCallback: (result: OnGyroscopeChangeCallbackResult) => void

Type declaration

▸ (result): void

A callback function for gyro data change events

Parameters

NameType
resultOnGyroscopeChangeCallbackResult

Returns

void


Interface: OnGyroscopeChangeCallbackResult

NameTypeDescription
xnumberx Angular velocity of shaft
ynumbery Angular velocity of shaft
znumberz Angular velocity of shaft