|
Aruna
|
#include <PCA9685.h>


Public Member Functions | |
| PCA9685 (uint8_t led, I2C_master *i2c_bus, uint8_t i2c_address=default_i2c_address) | |
| PCA9685 pwm object for every LED. More... | |
| ~PCA9685 () | |
| uint32_t | get_frequency () |
| err_t | set_duty (uint16_t on, uint16_t off) |
| Set the on and off timing of the PCA9685 led. More... | |
| uint16_t | get_duty () |
| err_t | get_duty (uint16_t &on, uint16_t &off) |
| Get the on and off timing of the PCA9685 led. More... | |
| err_t | is_connected () |
| Is the PCA9685 connected to the I²C bus. More... | |
Public Member Functions inherited from aruna::driver::Pwm | |
| err_t | set_frequency (uint32_t frequency_hz) |
| Set frequency of PWM in hertz. More... | |
| uint32_t | get_frequency () const |
| Get the frequency used in hertz. More... | |
| err_t | set_duty (float duty_percentage) |
| Set the duty cycle on time in percentage. More... | |
| err_t | set_duty (uint16_t duty) |
| Set the duty cycle on time (16bit). More... | |
| float | get_duty_per () const |
| Get the duty cycle on time in percentage. More... | |
| uint16_t | get_duty () const |
| Get the duty cycle on time (16bit) More... | |
Public Member Functions inherited from aruna::movement::Actuator | |
| Actuator (axis_mask_t axis=axis_mask_t::NONE) | |
| Actuator object, used by the movement module for vehicle movement. More... | |
| virtual | ~Actuator () |
| err_t | set_axis (axis_mask_t new_axis) |
| Set the axis that this Actuator is capable in moving in. More... | |
| axis_mask_t | get_axis () |
| get the movement modes that this driver supports. More... | |
| err_t | set (axis_mask_t axisMask, int16_t speed) |
| Set the speed of the motors directly. More... | |
| uint16_t | get_speed () |
| Get the current speed of Actuator. More... | |
Private Member Functions | |
| err_t | _set_frequency (uint32_t frequency_hz) override |
| err_t | _set_duty (uint16_t duty) override |
Private Attributes | |
| const uint8_t | led |
| const uint8_t | i2c_address |
| I2C_master * | i2c_bus |
Static Private Attributes | |
| static aruna::log::channel_t | log |
| uint8_t static const | default_i2c_address = 0b1000000 |
Additional Inherited Members | |
Public Attributes inherited from aruna::movement::Actuator | |
| err_t | startup_error = err_t::NOT_STARTED |
| error when constructing gets put here, read before usage. More... | |
Static Protected Member Functions inherited from aruna::movement::Actuator | |
| static double | convert_range (uint16_t input, float range_max=100.f, float range_min=0.f) |
| Convert uint16 to a new range. More... | |
|
strongprivate |
|
strongprivate |
|
strongprivate |
|
strongprivate |
|
strongprivate |
|
strongprivate |
|
strongprivate |
|
strongprivate |
|
strongprivate |
|
strongprivate |
|
strongprivate |
|
strongprivate |
|
strongprivate |
| PCA9685::PCA9685 | ( | uint8_t | led, |
| I2C_master * | i2c_bus, | ||
| uint8_t | i2c_address = default_i2c_address |
||
| ) |
PCA9685 pwm object for every LED.
| led | 0-15 led number |
| i2c_address | I²C address of the IC |
| i2c_bus | Bus to use for I²C communication. |
Definition at line 13 of file PCA9685.cpp.

| PCA9685::~PCA9685 | ( | ) |
Definition at line 109 of file PCA9685.cpp.

|
overrideprivatevirtual |
Implements aruna::driver::Pwm.
Definition at line 71 of file PCA9685.cpp.

|
overrideprivatevirtual |
Implements aruna::driver::Pwm.
Definition at line 34 of file PCA9685.cpp.

| uint16_t PCA9685::get_duty | ( | ) |
Definition at line 89 of file PCA9685.cpp.

| err_t PCA9685::get_duty | ( | uint16_t & | on, |
| uint16_t & | off | ||
| ) |
Get the on and off timing of the PCA9685 led.
| on | 12 bit time to set signal to high |
| off | 12 bit time to set signal to low |
Definition at line 99 of file PCA9685.cpp.

| uint32_t PCA9685::get_frequency | ( | ) |
Definition at line 60 of file PCA9685.cpp.

| err_t PCA9685::is_connected | ( | ) |
Is the PCA9685 connected to the I²C bus.
Definition at line 114 of file PCA9685.cpp.

| err_t PCA9685::set_duty | ( | uint16_t | on, |
| uint16_t | off | ||
| ) |
Set the on and off timing of the PCA9685 led.
| on | 12 bit time to set signal to high |
| off | 12 bit time to set signal to low |
Definition at line 79 of file PCA9685.cpp.


|
staticprivate |
|
private |
|
staticprivate |