Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DCMotor

Hierarchy

  • DCMotor

Implements

Index

Constructors

constructor

  • Returns DCMotor

Properties

back_io_num

back_io_num: any

forward_io_num

forward_io_num: any

keys

keys: string[]

obniz

obniz: Obniz

params

params: any

pwm

requiredKeys

requiredKeys: string[]

status

Methods

forward

  • forward(): void
  • Start rotation to the forward direction.

    Returns void

move

  • move(forward?: undefined | false | true): void
  • Start rotation by specifying rotation direction.

    Parameters

    • Optional forward: undefined | false | true

      true is forward rotation, and false is reverse rotation.

    Returns void

power

  • power(power: number): void
  • Set the motor power.

    Parameters

    • power: number

      Specify between 0 and 100.

    Returns void

reverse

  • reverse(): void
  • Start rotation to the reverse direction.

    Returns void

stop

  • stop(): void
  • Stop rotation.

    Returns void

wired

  • wired(obniz: Obniz): void
  • Parameters

    Returns void

Static info

  • Returns ObnizPartsInfo

Generated using TypeDoc