Class that stores state and functions for interacting with TLC5947 24-channel PWM/LED driver.
More...
#include <Adafruit_TLC5947.h>
|
| Adafruit_TLC5947 (uint16_t n, uint8_t c, uint8_t d, uint8_t l) |
| Instantiates a new TLC5947 class. More...
|
|
| ~Adafruit_TLC5947 () |
| Releases allocated resources.
|
|
boolean | begin (void) |
| Setups the HW. More...
|
|
void | setPWM (uint16_t chan, uint16_t pwm) |
| Set the PWM channel / value. More...
|
|
uint16_t | getPWM (uint16_t chan) |
| Get the PWM value for channel. More...
|
|
void | setLED (uint16_t lednum, uint16_t r, uint16_t g, uint16_t b) |
| Set LED. More...
|
|
void | write () |
| Writes PWM data to the all connected TLC5947 boards.
|
|
Class that stores state and functions for interacting with TLC5947 24-channel PWM/LED driver.
◆ Adafruit_TLC5947()
Adafruit_TLC5947::Adafruit_TLC5947 |
( |
uint16_t |
n, |
|
|
uint8_t |
c, |
|
|
uint8_t |
d, |
|
|
uint8_t |
l |
|
) |
| |
Instantiates a new TLC5947 class.
- Parameters
-
n | num of drivers (boards) |
c | Arduino pin connected to TLC5947 clock pin |
d | Arduino pin connected to TLC5947 data pin |
l | Arduino pin connected to TLC5947 latch pin |
◆ begin()
boolean Adafruit_TLC5947::begin |
( |
void |
| ) |
|
Setups the HW.
- Returns
- True if initialization was successful, otherwise false.
◆ setPWM()
void Adafruit_TLC5947::setPWM |
( |
uint16_t |
chan, |
|
|
uint16_t |
pwm |
|
) |
| |
Set the PWM channel / value.
- Parameters
-
chan | channel number ([0 - 23] on each board, so channel 2 for second board will be 25) |
pwm | pwm value [0-4095] |
◆ getPWM()
uint16_t Adafruit_TLC5947::getPWM |
( |
uint16_t |
chan | ) |
|
Get the PWM value for channel.
- Parameters
-
chan | channel number ([0 - 23] on each board, so channel 2 for second board will be 25) |
- Returns
- PWM value ([0 - 4095]) for valid channels, 0 for non-existing channels.
◆ setLED()
void Adafruit_TLC5947::setLED |
( |
uint16_t |
lednum, |
|
|
uint16_t |
r, |
|
|
uint16_t |
g, |
|
|
uint16_t |
b |
|
) |
| |
Set LED.
- Parameters
-
lednum | led number |
r | red value [0-255] |
g | green value [0-255] |
b | blue value [0-255] |
The documentation for this class was generated from the following files: