rotaryrgb
2.1.0.0
|
Rotary RGB Click is a compact add-on board for creating visual effects and precise position indications. This board features 16 individual RGB LEDs (WS2812B-2020) from Worldsemi and a high-quality rotary encoder (EC12D1564402) from ALPS. The WS2812B-2020 offers low driving voltage, high brightness, and excellent consistency, while the rotary encoder provides accurate 15-pulse incremental encoding with push-button functionality.
We provide a library for the Rotary 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 Rotary RGB Click driver.
rotaryrgb_cfg_setup
Config Object Initialization function. rotaryrgb_init
Initialization function. rotaryrgb_set_led_pos_color
This function sets the desired color for the selected LED position rotaryrgb_set_all_leds_data
This function, using the GPIO protocol, writes the desired array of 16 elements of data to control all LEDs. rotaryrgb_get_state_switch
This function return rotary encoder switch signal, states of the SW(INT) pin. This library contains the API for the Rotary RGB Click driver to control LEDs states and a rotary encoder position readings.
The demo application is composed of two sections :
Initialization of GPIO module and log UART. After the driver init, the app turn off all LEDs.
This example demonstrates the use of the Rotary RGB Click board. The demo example shows the functionality of a rotary encoder used to control RGB LEDs. The switch controls the application of the colors, and the encoder mechanism controls the state of the LEDs.
Make sure the logic delays are defined for your system in the rotaryrgb_delays.h file.
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.