pamoja for TypeScript - v0.2.0
    Preparing search index...

    Class Pca9685

    An NXP PCA9685 on an I2C bus, driving sixteen PWM outputs.

    Index
    • get frequency(): number

      The frequency the part runs at once the prescaler has rounded the one asked for, in hertz.

      Returns number

    • Reads one channel's four register bytes back from the part, one register a transfer, so the read works whatever MODE1 holds and changes nothing on the part. Rejects a channel past 15.

      Parameters

      • channel: number

      Returns Promise<Buffer<ArrayBufferLike>>

    • Programs the prescale and the output wiring with the oscillator asleep, wakes it, waits the 500 us it needs, and restarts the channels.

      Returns Promise<void>

    • Loads every channel with the same four bytes in one transfer.

      Parameters

      • pwm: Buffer

      Returns Promise<void>

    • Loads one channel with the four register bytes the pwm builders make, initializing the part first if init has not run. Rejects a channel past 15.

      Parameters

      • channel: number
      • pwm: Buffer

      Returns Promise<void>

    • Sends the general-call software reset, which returns every PCA9685 on the bus to its power-on state. It goes to address 0x00, which nothing on a simulated bus answers.

      Returns Promise<void>

    • Wakes the oscillator, waits the 500 us it needs, and restarts the channels that were running before the sleep.

      Returns Promise<void>