LambLisp 01 Red Fox Alpha
From AI to Actuator
Loading...
Searching...
No Matches
PCA9685 PWM / Servo Driver

Functions

Sexpr_t PCA9685_mop3_begin (Lamb &lamb, Sexpr_t sexpr, Sexpr_t env_exec)
Sexpr_t PCA9685_mop3_setupSingleDevice (Lamb &lamb, Sexpr_t sexpr, Sexpr_t env_exec)
Sexpr_t PCA9685_mop3_setSingleDeviceToFrequency (Lamb &lamb, Sexpr_t sexpr, Sexpr_t env_exec)
Sexpr_t PCA9685_mop3_getSingleDeviceFrequency (Lamb &lamb, Sexpr_t sexpr, Sexpr_t env_exec)
Sexpr_t PCA9685_mop3_setChannelDutyCycle (Lamb &lamb, Sexpr_t sexpr, Sexpr_t env_exec)
Sexpr_t PCA9685_mop3_setChannelPulseWidth (Lamb &lamb, Sexpr_t sexpr, Sexpr_t env_exec)
Sexpr_t PCA9685_mop3_setChannelServoPulseDuration (Lamb &lamb, Sexpr_t sexpr, Sexpr_t env_exec)
Sexpr_t PCA9685_mop3_setChannelOnAndOffTime (Lamb &lamb, Sexpr_t sexpr, Sexpr_t env_exec)
Sexpr_t PCA9685_install_mop3 (Lamb &lamb, Sexpr_t sexpr, Sexpr_t env_exec)

Variables

PCA9685 * pca9685 = 0

Detailed Description

LambLisp PCA9685 PWM / Servo Driver builtins.

Function Documentation

◆ PCA9685_mop3_begin()

Sexpr_t PCA9685_mop3_begin ( Lamb & lamb,
Sexpr_t sexpr,
Sexpr_t env_exec )

Initialize PCA9685 at I2C addr via Wire; sets 50 Hz PWM frequency.

◆ PCA9685_mop3_setupSingleDevice()

Sexpr_t PCA9685_mop3_setupSingleDevice ( Lamb & lamb,
Sexpr_t sexpr,
Sexpr_t env_exec )

Configure a single PCA9685 device on the Wire bus at the given I2C address.

◆ PCA9685_mop3_setSingleDeviceToFrequency()

Sexpr_t PCA9685_mop3_setSingleDeviceToFrequency ( Lamb & lamb,
Sexpr_t sexpr,
Sexpr_t env_exec )

Set PWM oscillator frequency (Hz) for a single device at the given I2C address.

◆ PCA9685_mop3_getSingleDeviceFrequency()

Sexpr_t PCA9685_mop3_getSingleDeviceFrequency ( Lamb & lamb,
Sexpr_t sexpr,
Sexpr_t env_exec )

Read back the PWM oscillator frequency (Hz) for a single device at the given address.

◆ PCA9685_mop3_setChannelDutyCycle()

Sexpr_t PCA9685_mop3_setChannelDutyCycle ( Lamb & lamb,
Sexpr_t sexpr,
Sexpr_t env_exec )

Set channel duty cycle as a fraction [0.0, 1.0] with optional phase shift fraction.

◆ PCA9685_mop3_setChannelPulseWidth()

Sexpr_t PCA9685_mop3_setChannelPulseWidth ( Lamb & lamb,
Sexpr_t sexpr,
Sexpr_t env_exec )

Set channel pulse width in raw 12-bit ticks (0–4095).

◆ PCA9685_mop3_setChannelServoPulseDuration()

Sexpr_t PCA9685_mop3_setChannelServoPulseDuration ( Lamb & lamb,
Sexpr_t sexpr,
Sexpr_t env_exec )

Set channel servo pulse duration in microseconds.

◆ PCA9685_mop3_setChannelOnAndOffTime()

Sexpr_t PCA9685_mop3_setChannelOnAndOffTime ( Lamb & lamb,
Sexpr_t sexpr,
Sexpr_t env_exec )

Set channel on-time and off-time in raw 12-bit ticks; on-time anchored at 0.