Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Toio_CoreCube

Implements

Index

Constructors

constructor

Properties

functionButtonPress

functionButtonPress: ((value: number) => void) | null = null

functionMotionChange

functionMotionChange: ((value: number) => void) | null = null

Optional ioKeys

ioKeys: string[]

keys

keys: string[] = []

Optional ondisconnect

ondisconnect: undefined | ((reason: any) => void)

params

params: any

peripheral

peripheral: BleRemotePeripheral | null = null

requiredKeys

requiredKeys: string[] = []

Methods

connectWait

  • connectWait(timeout: number): Promise<number>
  • Parameters

    • timeout: number

    Returns Promise<number>

disconnectWait

  • disconnectWait(): Promise<void>
  • Returns Promise<void>

getBatteryStateWait

  • getBatteryStateWait(): Promise<number>
  • Returns Promise<number>

getButtonStateWait

  • getButtonStateWait(): Promise<boolean>
  • Returns Promise<boolean>

getMotionWait

  • getMotionWait(): Promise<{ atitude: number; isCollision: boolean; isDoubletap: boolean; isHorizon: boolean }>
  • Returns Promise<{ atitude: number; isCollision: boolean; isDoubletap: boolean; isHorizon: boolean }>

getPositionWait

  • getPositionWait(): Promise<{ angle: number; posSensorAngle: number; posSensorX: number; posSensorY: number; posX: number; posY: number }>
  • Returns Promise<{ angle: number; posSensorAngle: number; posSensorX: number; posSensorY: number; posX: number; posY: number }>

moveAroundWait

  • moveAroundWait(_leftWheelPower?: number, _rightWheelPower?: number): Promise<void>
  • Parameters

    • Default value _leftWheelPower: number = 0
    • Default value _rightWheelPower: number = 0

    Returns Promise<void>

movePositionWait

  • movePositionWait(timeoutSec?: number, moveType?: number, maxWheelPower?: number, wheelPowerType?: number, targetPosX?: number, targetPosY?: number, targetAngle?: number): Promise<void>
  • Parameters

    • Default value timeoutSec: number = 5
    • Default value moveType: number = 0
    • Default value maxWheelPower: number = 30
    • Default value wheelPowerType: number = 30
    • Default value targetPosX: number = 0
    • Default value targetPosY: number = 0
    • Default value targetAngle: number = 0

    Returns Promise<void>

wired

  • wired(obniz: Obniz): void
  • Parameters

    Returns void

Static info

  • Returns ObnizPartsInfo

Static isDevice

  • Parameters

    Returns boolean

Generated using TypeDoc