Class BoardClient

A gRPC-web client for the Board component.

Implements

Constructors

Properties

callOptions: CallOptions = ...
name: string

The name of the resource.

Methods

  • Send/Receive arbitrary commands to the resource.

    Parameters

    • command: Struct

      The command to execute.

    • callOptions: CallOptions = ...

    Returns Promise<JsonValue>

  • Return the current value of the interrupt which is based on the type of interrupt.

    Parameters

    • digitalInterruptName: string

      The name of the digital interrupt.

    • extra: {} = {}
    • callOptions: CallOptions = ...

    Returns Promise<number>

  • Parameters

    • pin: string
    • extra: {} = {}
    • callOptions: CallOptions = ...

    Returns Promise<boolean>

  • Get the duty cycle of the given pin of a board.

    Parameters

    • pin: string

      The pin.

    • extra: {} = {}
    • callOptions: CallOptions = ...

    Returns Promise<number>

    The duty cycle, which is a value from 0 to 1.

  • Get the PWM frequency of the given pin of a board.

    Parameters

    • pin: string

      The pin.

    • extra: {} = {}
    • callOptions: CallOptions = ...

    Returns Promise<number>

  • Read the current value of an analog reader of a board.

    Parameters

    • analogReader: string

      The name of the analog reader.

    • extra: {} = {}
    • callOptions: CallOptions = ...

    Returns Promise<ReadAnalogReaderResponse>

  • Set the high/low state of the given pin of a board.

    Parameters

    • pin: string

      The pin.

    • high: boolean

      When true, set the given pin to high. When false, set the given pin to low.

    • extra: {} = {}
    • callOptions: CallOptions = ...

    Returns Promise<void>

  • Set power mode of the board.

    Parameters

    • powerMode: boardApi.PowerMode

      The requested power mode.

    • Optionalduration: Duration

      The requested duration to stay in power mode.

    • extra: {} = {}
    • callOptions: CallOptions = ...

    Returns Promise<void>

  • Set the duty cycle of the given pin of a board.

    Parameters

    • pin: string

      The pin.

    • dutyCyle: number
    • extra: {} = {}
    • callOptions: CallOptions = ...

    Returns Promise<void>

  • Set the PWM frequency of the given pin of a board.

    Parameters

    • pin: string

      The pin.

    • frequencyHz: number

      The PWM frequency, in hertz. 0 will use the board's default PWM frequency.

    • extra: {} = {}
    • callOptions: CallOptions = ...

    Returns Promise<void>

  • Stream digital interrupt ticks on the board.

    Parameters

    • interrupts: string[]

      Names of the interrupts to stream.

    • queue: Tick[]

      Array to put the ticks in.

    • extra: {} = {}
    • callOptions: CallOptions = ...

    Returns Promise<void>

  • Write an analog value to a pin on the board.

    Parameters

    • pin: string

      The pin name.

    • value: number

      An integer value to write.

    • extra: {} = {}
    • callOptions: CallOptions = ...

    Returns Promise<void>

MMNEPVFCICPMFPCPTTAAATR