Adafruit TLC59711
Public Member Functions | List of all members
Adafruit_TLC59711 Class Reference

Class that stores state and functions for interacting with TLC59711 Senor. More...

#include <Adafruit_TLC59711.h>

Public Member Functions

 Adafruit_TLC59711 (uint8_t n, uint8_t c, uint8_t d)
 Instantiates a new Adafruit_TLC59711 class. More...
 
 Adafruit_TLC59711 (uint8_t n, SPIClass *theSPI=&SPI)
 Instantiates a new Adafruit_TLC59711 class using provided SPI. More...
 
bool begin ()
 Begins SPI connection if there is not empty PWM buffer. More...
 
void setPWM (uint16_t chan, uint16_t pwm)
 Set PWM value on selected channel. More...
 
void setLED (uint8_t lednum, uint16_t r, uint16_t g, uint16_t b)
 Set RGB value for selected LED. More...
 
void getLED (uint8_t lednum, uint16_t &r, uint16_t &g, uint16_t &b)
 Get RGB value for selected LED. More...
 
void write ()
 Writes PWM buffer to board.
 
void setBrightness (uint8_t bcr, uint8_t bcg, uint8_t bcb)
 Set the brightness of LED channels to specific value. More...
 
void simpleSetBrightness (uint8_t BC)
 Set the brightness of LED channels to same value. More...
 

Detailed Description

Class that stores state and functions for interacting with TLC59711 Senor.

Constructor & Destructor Documentation

◆ Adafruit_TLC59711() [1/2]

Adafruit_TLC59711::Adafruit_TLC59711 ( uint8_t  n,
uint8_t  c,
uint8_t  d 
)

Instantiates a new Adafruit_TLC59711 class.

Parameters
nnumber of connected drivers
cclock pin
ddata pin

◆ Adafruit_TLC59711() [2/2]

Adafruit_TLC59711::Adafruit_TLC59711 ( uint8_t  n,
SPIClass *  theSPI = &SPI 
)

Instantiates a new Adafruit_TLC59711 class using provided SPI.

Parameters
nnumber of connected drivers
*theSPIspi object

Member Function Documentation

◆ begin()

bool Adafruit_TLC59711::begin ( )

Begins SPI connection if there is not empty PWM buffer.

Returns
If successful returns true, otherwise false

◆ setPWM()

void Adafruit_TLC59711::setPWM ( uint16_t  chan,
uint16_t  pwm 
)

Set PWM value on selected channel.

Parameters
chanone from 12 channel (per driver) so there is 12 * number of drivers
pwmpwm value

◆ setLED()

void Adafruit_TLC59711::setLED ( uint8_t  lednum,
uint16_t  r,
uint16_t  g,
uint16_t  b 
)

Set RGB value for selected LED.

Parameters
lednumselected LED number that for which value will be set
rred value
ggreen value
bblue value

◆ getLED()

void Adafruit_TLC59711::getLED ( uint8_t  lednum,
uint16_t &  r,
uint16_t &  g,
uint16_t &  b 
)

Get RGB value for selected LED.

Parameters
lednumselected LED number that for which value will be set
rred value
ggreen value
bblue value

◆ setBrightness()

void Adafruit_TLC59711::setBrightness ( uint8_t  bcr,
uint8_t  bcg,
uint8_t  bcb 
)

Set the brightness of LED channels to specific value.

Parameters
bcrBrightness Control Red value
bcgBrightness Control Green value
bcbBrightness Control Blue value

◆ simpleSetBrightness()

void Adafruit_TLC59711::simpleSetBrightness ( uint8_t  BC)

Set the brightness of LED channels to same value.

Parameters
BCBrightness Control value

The documentation for this class was generated from the following files: