Skip to main content

bn.startAccelerometer

startAccelerometer(options?): Promise<void>

description Start monitoring the acceleration data.

example

 bn.startAccelerometer({ interval: 'game' })

Parameters

NameType
options?StartAccelerometerOption

Returns

Promise<void>


Interface: StartAccelerometerOption#

NameTypeDescription
interval?"normal" | "game" | "ui"Monitor the execution frequency of the acceleration data callback function.; game: The callback frequency for updating the game, in 20ms/second About.; ui: Apply to update UI Callback frequency of 60ms/second About.; normal: Normal callback frequency, in the 200ms/second About.