Options
All
  • Public
  • Public/Protected
  • All
Menu

megabit

Index

Type aliases

Acceleration

Acceleration: [number, number, number]

Channel

Channel: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15

Direction

Direction: "" | "right" | "left" | "up" | "down" | "forward" | "back" | "clockwise" | "counterclockwise"

DirectionMode

DirectionMode: "in" | "out"

Distance

Distance: number

EnableLongRangeMode

EnableLongRangeMode: Boolean

GPIOValue

GPIOValue: 0 | 1

I2CSlaveAddress

I2CSlaveAddress: number

Illuminance

Illuminance: number

PinName

PinName: string

PortName

PortName: string

PortNumber

PortNumber: number

RGB

RGB: [number, number, number]

Temperature

Temperature: number

Touched

Touched: [boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean]

UVA

UVA: number

Variables

Const GPIOPortMapSizeMax

GPIOPortMapSizeMax: 1024 = 1024

Const I2CPortMapSizeMax

I2CPortMapSizeMax: 32 = 32

Const PollingInterval

PollingInterval: 100 = 100

Interval of file system polling, in milliseconds.

Const SysfsGPIOPath

SysfsGPIOPath: "/sys/class/gpio" = "/sys/class/gpio"

Const Uint16Max

Uint16Max: 65535 = 65535

Functions

ads1015

  • ads1015(bus?: I2C, address?: number, channel?: 0 | 1 | 2 | 3): ReadableDevice<number>
  • Parameters

    • Default value bus: I2C = i2c()
    • Default value address: number = 72
    • Default value channel: 0 | 1 | 2 | 3 = 0

    Returns ReadableDevice<number>

adt7410

adxl345

gp2y0e03

gpio

  • gpio(pin: number): GPIO

i2c

  • i2c(bus?: number): I2C
  • Parameters

    • Default value bus: number = 1

    Returns I2C

mpr121

paj7620

parseUint16

  • parseUint16(string: string): number
  • Parameters

    • string: string

    Returns number

pca9685

  • pca9685(bus?: I2C, address?: number, channel?: Channel, minPulse?: undefined | number, maxPulse?: undefined | number, angleRange?: undefined | number): WritableDevice<number>
  • Parameters

    • Default value bus: I2C = i2c()
    • Default value address: number = 64
    • Default value channel: Channel = 0
    • Optional minPulse: undefined | number

      sec

    • Optional maxPulse: undefined | number

      sec

    • Optional angleRange: undefined | number

      deg

    Returns WritableDevice<number>

requestGPIOAccess

  • Returns Promise<GPIOAccess>

requestI2CAccess

  • Returns Promise<I2CAccess>

s11059

ssd1306

ssd1308

tsl2561

veml6070

vl53l0x

Generated using TypeDoc