VibrationMotor
A vibration motor.
import { VibrationMotor } from "@devicescript/core"
const vibrationMotor = new VibrationMotor()
Commands
vibrate
Starts a sequence of vibration and pauses. To stop any existing vibration, send an empty payload.
vibrationMotor.vibrate(duration: number, intensity: number): Promise<void>
Registers
maxVibrations
The maximum number of vibration sequences supported in a single packet.
type:
Register<number>
(packing formatu8
)optional: this register may not be implemented
constant: the register value will not change (until the next reset)
read only
import { VibrationMotor } from "@devicescript/core"
const vibrationMotor = new VibrationMotor()
// ...
const value = await vibrationMotor.maxVibrations.read()
note
write
and read
will block until a server is bound to the client.