Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SH200Q

Hierarchy

Implements

Index

Constructors

constructor

Properties

address

address: any

keys

keys: string[]

params

params: any

requiredKeys

requiredKeys: string[]

Methods

_reset

  • _reset(): void
  • Returns void

calcTemp

  • calcTemp(data?: number | null | undefined): number | null
  • Parameters

    • Optional data: number | null | undefined

    Returns number | null

char2short

  • char2short(val1: number, val2: number): any
  • Parameters

    • val1: number
    • val2: number

    Returns any

clearFlagWait

  • clearFlagWait(address: number, index: number): Promise<void>
  • Parameters

    • address: number
    • index: number

    Returns Promise<void>

getAccelAdcArrayWait

  • getAccelAdcArrayWait(): Promise<number[]>

getAccelAdcWait

  • getAccelAdcWait(): Promise<Xyz>

getAccelArrayWait

  • getAccelArrayWait(): Promise<number[]>

getAccelRange

getAccelUnit

getAccelWait

  • getAccelWait(): Promise<Xyz>

getAccelerometerWait

  • getAccelerometerWait(): Promise<Xyz>

getAllAdcArrayWait

  • getAllAdcArrayWait(): Promise<any[]>

getAllAdcWait

getAllArrayWait

  • getAllArrayWait(): Promise<any[]>

getAllDataWait

getAllWait

getGyroAdcArrayWait

  • getGyroAdcArrayWait(): Promise<number[]>

getGyroAdcWait

  • getGyroAdcWait(): Promise<Xyz>

getGyroArrayWait

  • getGyroArrayWait(): Promise<number[]>

getGyroRange

getGyroUnit

getGyroWait

  • getGyroWait(): Promise<Xyz>

getGyroscopeWait

  • getGyroscopeWait(): Promise<Xyz>

getTempAdcWait

  • getTempAdcWait(): Promise<number>

getTempWait

  • getTempWait(): Promise<number | null>

getWait

i2cInfo

initWait

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

readWait

  • readWait(command: number, length: number): Promise<number[]>
  • Parameters

    • command: number
    • length: number

    Returns Promise<number[]>

resetAdcWait

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

setAccelRange

setAccelUnit

setConfig

  • setConfig(accelerometer_range: number, gyroscope_range: number): void
  • Parameters

    • accelerometer_range: number
    • gyroscope_range: number

    Returns void

setGyroRange

setGyroUnit

  • setGyroUnit(gyro_unit: gyroUnit): void

whoamiWait

  • whoamiWait(): Promise<number>

wired

  • wired(obniz: Obniz): void

write

  • write(command: any, buf: any): void
  • Parameters

    • command: any
    • buf: any

    Returns void

writeFlagWait

  • writeFlagWait(address: number, index: number): Promise<void>
  • Parameters

    • address: number
    • index: number

    Returns Promise<void>

Static charArrayToInt16

  • charArrayToInt16(values: [number, number], endian?: string): number
  • Parameters

    • values: [number, number]
    • Default value endian: string = "b"

    Returns number

Static charArrayToXyz

  • charArrayToXyz(data: number[], endian?: string, scaleFunc?: (Anonymous function)): Xyz
  • Parameters

    • data: number[]
    • Default value endian: string = "b"
    • Default value scaleFunc: (Anonymous function) = (d: number): number => d

    Returns Xyz

Static info

  • Returns ObnizPartsInfo

Object literals

i2cinfo

i2cinfo: object

address

address: number = 108

clock

clock: number = 100000

pull

pull: "3v" = "3v"

voltage

voltage: "3v" = "3v"

Static commands

commands: object

acc_config

acc_config: number = 14

acc_range

acc_range: number = 22

adc_reset

adc_reset: number = 194

fifo_config

fifo_config: number = 18

gyro_config

gyro_config: number = 15

gyro_dlpf

gyro_dlpf: number = 17

gyro_range

gyro_range: number = 43

output_acc

output_acc: number = 0

output_gyro

output_gyro: number = 6

output_temp

output_temp: number = 12

reg_set1

reg_set1: number = 186

reg_set2

reg_set2: number = 202

reset

reset: number = 117

soft_reset

soft_reset: number = 127

whoami

whoami: number = 48

whoami_result

whoami_result: number = 24

accel_fs_sel

accel_fs_sel: object

16g

16g: number = 2

4g

4g: number = 0

8g

8g: number = 1

gyro_fs_sel

gyro_fs_sel: object

1000dps

1000dps: number = 1

125dps

125dps: number = 4

2000dps

2000dps: number = 0

250dps

250dps: number = 3

500dps

500dps: number = 2

Generated using TypeDoc