API¶
s-light CircuitPython TLC5957 library.¶
CircuitPython library for TI TLC5957 48-channel 16bit LED-Driver
- Author(s): Stefan Krüger
Implementation Notes¶
Hardware:
- example PCB with TLC5957 and 4x4 SMD RGB LEDs https://github.com/s-light/magic_amulet_pcbs/tree/master/LEDBoard_4x4_HD
Software and Dependencies:
- Adafruit CircuitPython firmware for the supported boards: https://github.com/adafruit/circuitpython/releases
-
class
slight_tlc5957.
TLC5957
(spi, spi_clock, spi_mosi, spi_miso, latch, gsclk, pixel_count=16)¶ TLC5957 16-bit 48 channel LED PWM driver.
This chip is designed to drive 16 RGB LEDs with 16-bit PWM per Color. The class has an interface compatible with FancyLED. and with this is similar to the NeoPixel and DotStar Interfaces.
Parameters: - spi (SPI) – An instance of the SPI bus connected to the chip. The clock and MOSI must be set the MISO (input) is currently unused. Maximal data clock frequence is: - TLC5957: 33MHz
- latch (DigitalInOut) – The chip LAT (latch) pin object that implements the DigitalInOut API.
- gsclk (PWMOut) – The chip Grayscale Clock pin object that implements the PWMOut API.
- pixel_count (bool) – Number of RGB-LEDs (=Pixels) are connected.
-
class
Function_Command
¶ Enum for available function commands.
-
set_channel
(channel_index, value)¶ Set the value for the provided channel.
Parameters:
-
show
()¶ Write out Grayscale Values to chips.