c1x4rgb
2.1.0.0
|
1x4 RGB Click is a compact add-on board that creates vivid and dynamic lighting effects. This board features the LP5812, an advanced RGB LED driver from Texas Instruments. It features ultra-low operation current, an autonomous animation engine, and support for both analog and PWM dimming. The board operates with 3.3V or 5V logic voltage levels and communicates with the host MCU via a standard 2-wire I2C interface. It is suitable for portable and wearable electronics, gaming, home entertainment, IoT, networking, industrial HMI, and many more.
We provide a library for the 1x4 RGB Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Package can be downloaded/installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
This library contains API for 1x4 RGB Click driver.
c1x4rgb_cfg_setup
Config Object Initialization function. c1x4rgb_init
Initialization function. c1x4rgb_default_cfg
Click Default Configuration function. c1x4rgb_set_rgb_color
This function sets the desired values of RGB colors for the selected LED by using the I2C serial interface. c1x4rgb_enable_leds
This function turns on the desired LEDs by using the I2C serial interface. c1x4rgb_set_tmc_mode
This function configures the desired LED drive mode as TCM 1/2/3/4 scans using the I2C serial interface. This example demonstrates the use of the 1x4 RGB Click board by controlling the color of the LEDs [LD1-LD4].
The demo application is composed of two sections :
Initialization of I2C module and log UART. After driver initialization, the app executes a default configuration.
The demo example shows the color change of four RGB LEDs, starting with red color, through green and blue, and ending with white. These LEDs actually consist of three single-colored LEDs (Red-Green-Blue) in a single package. Various colors can be reproduced by mixing the intensity of each LED.
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
Other Mikroe Libraries used in the example:
Additional notes and informations
Depending on the development board you are using, you may need USB UART click, USB UART 2 Click or RS232 Click to connect to your PC, for development systems with no UART to USB interface available on the board. UART terminal is available in all MikroElektronika compilers.